devd.cc (114086) | devd.cc (114541) |
---|---|
1/*- 2 * Copyright (c) 2002-2003 M. Warner Losh. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 20 unchanged lines hidden (view full) --- 29 */ 30 31// TODO list: 32// o devd.conf and devd man pages need a lot of help: 33// - devd.conf needs to lose the warning about zone files. 34// - devd.conf needs more details on the supported statements. 35 36#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2003 M. Warner Losh. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 20 unchanged lines hidden (view full) --- 29 */ 30 31// TODO list: 32// o devd.conf and devd man pages need a lot of help: 33// - devd.conf needs to lose the warning about zone files. 34// - devd.conf needs more details on the supported statements. 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 114086 2003-04-26 20:59:04Z imp $"); | 37__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 114541 2003-05-02 17:38:08Z imp $"); |
38 39#include <sys/param.h> 40#include <sys/types.h> 41#include <sys/sysctl.h> 42 43#include <ctype.h> 44#include <dirent.h> 45#include <errno.h> --- 657 unchanged lines hidden (view full) --- 703 704static void 705check_devd_enabled() 706{ 707 int val = 0; 708 size_t len; 709 710 len = sizeof(val); | 38 39#include <sys/param.h> 40#include <sys/types.h> 41#include <sys/sysctl.h> 42 43#include <ctype.h> 44#include <dirent.h> 45#include <errno.h> --- 657 unchanged lines hidden (view full) --- 703 704static void 705check_devd_enabled() 706{ 707 int val = 0; 708 size_t len; 709 710 len = sizeof(val); |
711 if (sysctlbyname(SYSCTL, &val, &len, NULL, NULL) != 0) | 711 if (sysctlbyname(SYSCTL, &val, &len, NULL, 0) != 0) |
712 errx(1, "devctl sysctl missing from kernel!"); 713 if (val) { 714 warnx("Setting " SYSCTL " to 0"); 715 val = 0; 716 sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val)); 717 } 718} 719 --- 35 unchanged lines hidden --- | 712 errx(1, "devctl sysctl missing from kernel!"); 713 if (val) { 714 warnx("Setting " SYSCTL " to 0"); 715 val = 0; 716 sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val)); 717 } 718} 719 --- 35 unchanged lines hidden --- |