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:
iedowse 2004-01-04 17:17:46 +00:00
parent beec06dbdd
commit 6fde69b7d1
2 changed files with 3 additions and 2 deletions

View File

@ -71,6 +71,7 @@
#define _PATH_MAN "/usr/share/man"
#define _PATH_MDCONFIG "/sbin/mdconfig"
#define _PATH_MEM "/dev/mem"
#define _PATH_MKSNAP_FFS "/sbin/mksnap_ffs"
#define _PATH_MOUNT "/sbin/mount"
#define _PATH_NEWFS "/sbin/newfs"
#define _PATH_NOLOGIN "/var/run/nologin"

View File

@ -321,8 +321,8 @@ main(int argc, char *argv[])
snprintf(snapname, sizeof snapname,
"%s/.snap/dump_snapshot", mntpt);
snprintf(snapcmd, sizeof snapcmd,
"mksnap_ffs %s %s", mntpt, snapname);
snprintf(snapcmd, sizeof snapcmd, "%s %s %s",
_PATH_MKSNAP_FFS, mntpt, snapname);
unlink(snapname);
if (system(snapcmd) != 0)
errx(X_STARTUP, "Cannot create %s: %s\n",