*
*/
+#include <limits.h>
#include <stdio.h>
#include <mntent.h>
#include <errno.h>
extern int umount_main(int argc, char **argv)
{
+ char path[PATH_MAX];
+
if (argc < 2) {
show_usage();
}
else
return EXIT_FAILURE;
}
- if (do_umount(*argv) == TRUE)
+ if (realpath(*argv, path) == NULL)
+ perror_msg_and_die("%s", path);
+ if (do_umount(path) == TRUE)
return EXIT_SUCCESS;
perror_msg_and_die("%s", *argv);
}
*
*/
+#include <limits.h>
#include <stdio.h>
#include <mntent.h>
#include <errno.h>
extern int umount_main(int argc, char **argv)
{
+ char path[PATH_MAX];
+
if (argc < 2) {
show_usage();
}
else
return EXIT_FAILURE;
}
- if (do_umount(*argv) == TRUE)
+ if (realpath(*argv, path) == NULL)
+ perror_msg_and_die("%s", path);
+ if (do_umount(path) == TRUE)
return EXIT_SUCCESS;
perror_msg_and_die("%s", *argv);
}