[Toybox] Patch mountpoint
Hyejin Kim
hj8296 at gmail.com
Wed May 6 01:34:31 PDT 2015
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)) {
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20150506/41800cbd/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-patch-mountpoint-support-symbolic-link-if-have-x-opt.patch
Type: application/octet-stream
Size: 798 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20150506/41800cbd/attachment.obj>
More information about the Toybox
mailing list