diff options
-rw-r--r-- | sbin/dumpon/dumpon.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_shutdown.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c index 76cdc60..6017aa1 100644 --- a/sbin/dumpon/dumpon.c +++ b/sbin/dumpon/dumpon.c @@ -84,7 +84,7 @@ main(int argc, char **argv) err(EX_OSFILE, "%s", argv[0]); } - if (!S_ISBLK(stab.st_mode)) { + if (!S_ISCHR(stab.st_mode)) { errx(EX_USAGE, "%s: must specify a block device", argv[0]); } diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index cc7e9ff..18272ad 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -412,10 +412,10 @@ sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS int error; udev_t ndumpdev; - ndumpdev = dev2budev(dumpdev); + ndumpdev = dev2udev(dumpdev); error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req); if (error == 0 && req->newptr != NULL) - error = setdumpdev(udev2dev(ndumpdev, 1)); + error = setdumpdev(udev2dev(ndumpdev, 0)); return (error); } |