Define _PATH_MKSNAP_FFS and use it in dump(8) instead of assuming
that mksnap_ffs(8) can be found using the current $PATH. Reviewed by: mckusick
This commit is contained in:
parent
0a2956bbc0
commit
6e3aaeb2d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124132
@ -71,6 +71,7 @@
|
|||||||
#define _PATH_MAN "/usr/share/man"
|
#define _PATH_MAN "/usr/share/man"
|
||||||
#define _PATH_MDCONFIG "/sbin/mdconfig"
|
#define _PATH_MDCONFIG "/sbin/mdconfig"
|
||||||
#define _PATH_MEM "/dev/mem"
|
#define _PATH_MEM "/dev/mem"
|
||||||
|
#define _PATH_MKSNAP_FFS "/sbin/mksnap_ffs"
|
||||||
#define _PATH_MOUNT "/sbin/mount"
|
#define _PATH_MOUNT "/sbin/mount"
|
||||||
#define _PATH_NEWFS "/sbin/newfs"
|
#define _PATH_NEWFS "/sbin/newfs"
|
||||||
#define _PATH_NOLOGIN "/var/run/nologin"
|
#define _PATH_NOLOGIN "/var/run/nologin"
|
||||||
|
@ -321,8 +321,8 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
snprintf(snapname, sizeof snapname,
|
snprintf(snapname, sizeof snapname,
|
||||||
"%s/.snap/dump_snapshot", mntpt);
|
"%s/.snap/dump_snapshot", mntpt);
|
||||||
snprintf(snapcmd, sizeof snapcmd,
|
snprintf(snapcmd, sizeof snapcmd, "%s %s %s",
|
||||||
"mksnap_ffs %s %s", mntpt, snapname);
|
_PATH_MKSNAP_FFS, mntpt, snapname);
|
||||||
unlink(snapname);
|
unlink(snapname);
|
||||||
if (system(snapcmd) != 0)
|
if (system(snapcmd) != 0)
|
||||||
errx(X_STARTUP, "Cannot create %s: %s\n",
|
errx(X_STARTUP, "Cannot create %s: %s\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user