diff options
author | phk <phk@FreeBSD.org> | 2002-04-09 10:04:09 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-04-09 10:04:09 +0000 |
commit | 5b960672bf58f47c16c8a2d106c147c818632fde (patch) | |
tree | 61c96a50334702fac7b6db6058d8f9dac2ffb97e | |
parent | 272b6d2d0db6a4b931b9720bfd0b4dbc42d3f184 (diff) | |
download | FreeBSD-src-5b960672bf58f47c16c8a2d106c147c818632fde.zip FreeBSD-src-5b960672bf58f47c16c8a2d106c147c818632fde.tar.gz |
Rename DIOCGKERNELDUMP to DIOCSKERNELDUMP as it strictly speaking
is a "set" not a "get" operation.
Sponsored by: DARPA & NAI Labs.
-rw-r--r-- | sbin/dumpon/dumpon.c | 8 | ||||
-rw-r--r-- | sys/dev/null/null.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_disk.c | 2 | ||||
-rw-r--r-- | sys/sys/disk.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c index a0b9114..97976ca 100644 --- a/sbin/dumpon/dumpon.c +++ b/sbin/dumpon/dumpon.c @@ -84,9 +84,9 @@ main(int argc, char *argv[]) if (fd < 0) err(EX_OSFILE, "%s", argv[0]); u = 0; - i = ioctl(fd, DIOCGKERNELDUMP, &u); + i = ioctl(fd, DIOCSKERNELDUMP, &u); u = 1; - i = ioctl(fd, DIOCGKERNELDUMP, &u); + i = ioctl(fd, DIOCSKERNELDUMP, &u); if (i == 0 && verbose) printf("kernel dumps on %s\n", argv[0]); @@ -95,12 +95,12 @@ main(int argc, char *argv[]) if (fd < 0) err(EX_OSFILE, "%s", _PATH_DEVNULL); u = 0; - i = ioctl(fd, DIOCGKERNELDUMP, &u); + i = ioctl(fd, DIOCSKERNELDUMP, &u); if (i == 0 && verbose) printf("kernel dumps disabled\n"); } if (i < 0) - err(EX_OSERR, "ioctl(DIOCGKERNELDUMP)"); + err(EX_OSERR, "ioctl(DIOCSKERNELDUMP)"); exit (0); } diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 6fa5e2b..c82c3d0 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -97,7 +97,7 @@ null_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { int error; - if (cmd != DIOCGKERNELDUMP) + if (cmd != DIOCSKERNELDUMP) return (noioctl(dev, cmd, data, fflag, td)); error = suser(td); if (error) diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 155cfc3..b1f3e6a 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -390,7 +390,7 @@ diskioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) dp = pdev->si_disk; if (!dp) return (ENXIO); - if (cmd == DIOCGKERNELDUMP) { + if (cmd == DIOCSKERNELDUMP) { u = *(u_int *)data; return (diskdumpconf(u, dev, dp)); } diff --git a/sys/sys/disk.h b/sys/sys/disk.h index 00eec8d..2239189 100644 --- a/sys/sys/disk.h +++ b/sys/sys/disk.h @@ -51,6 +51,6 @@ void disk_invalidate(struct disk *disk); #define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ #define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */ #define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */ -#define DIOCGKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ +#define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ #endif /* _SYS_DISK_H_ */ |