1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Convert dumpon to work on character devices instead of block devices.

NB: You may need to change your /etc/rc.conf!
This commit is contained in:
Poul-Henning Kamp 1999-11-28 16:25:17 +00:00
parent 7b97bc478b
commit ee072c08d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53838
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ main(int argc, char **argv)
err(EX_OSFILE, "%s", argv[0]); 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", errx(EX_USAGE, "%s: must specify a block device",
argv[0]); argv[0]);
} }

View File

@ -412,10 +412,10 @@ sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS
int error; int error;
udev_t ndumpdev; udev_t ndumpdev;
ndumpdev = dev2budev(dumpdev); ndumpdev = dev2udev(dumpdev);
error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req); error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req);
if (error == 0 && req->newptr != NULL) if (error == 0 && req->newptr != NULL)
error = setdumpdev(udev2dev(ndumpdev, 1)); error = setdumpdev(udev2dev(ndumpdev, 0));
return (error); return (error);
} }