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:
parent
7b97bc478b
commit
ee072c08d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53838
@ -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]);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user