Hi.

Mountpoint doesnt support symlink argument now.
For example, "mountpoint -x symlink_path" displays wrong output.

plz have a look.



diff --git a/toys/other/mountpoint.c b/toys/other/mountpoint.c
index 150865c..d7432c9 100644
--- a/toys/other/mountpoint.c
+++ b/toys/other/mountpoint.c
@@ -33,7 +33,8 @@ void mountpoint_main(void)
   char *arg = *toys.optargs;
   int quiet = toys.optflags & FLAG_q;

-  if (lstat(arg, &st1)) perror_exit("%s", arg);
+  if ((toys.optflags & FLAG_x) && stat(arg, &st1) || lstat(arg, &st1))
+    perror_exit("%s", arg);

   if (toys.optflags & FLAG_x) {
     if (S_ISBLK(st1.st_mode)) {
--

Attachment: 0001-patch-mountpoint-support-symbolic-link-if-have-x-opt.patch
Description: Binary data

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to