]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - lib/ismounted.c
lib/timeutils: print error if timestamp can't be parsed
[thirdparty/util-linux.git] / lib / ismounted.c
index 565a8325931735830acdf94c31e53bf2086bace6..31be71a435aad17ce5f3cc8e2a2d7af3fc36bb20 100644 (file)
@@ -242,7 +242,7 @@ static int check_getmntinfo(const char *file, int *mount_flags,
                }
                 ++mp;
        }
-       if (mtpt)
+       if (mtpt && n >= 0)
                xstrncpy(mtpt, mp->f_mntonname, mtlen);
        return 0;
 }
@@ -305,7 +305,7 @@ leave:
 
 
 /*
- * check_mount_point() fills determines if the device is mounted or otherwise
+ * check_mount_point() determines if the device is mounted or otherwise
  * busy, and fills in mount_flags with one or more of the following flags:
  * MF_MOUNTED, MF_ISROOT, MF_READONLY, MF_SWAP, and MF_BUSY.  If mtpt is
  * non-NULL, the directory where the device is mounted is copied to where mtpt