- (void)strncpy(spcl.c_dev, disk, NAMELEN);
- (void)strncpy(spcl.c_filesys, "an unlisted file system",
- NAMELEN);
+ /*
+ * The argument was not found in the fstab
+ * assume that this is a subtree and search for it
+ */
+ dt = fstabsearchdir(pathname, directory);
+ if (dt != NULL) {
+ char name[MAXPATHLEN];
+ (void)strncpy(spcl.c_dev, dt->fs_spec, NAMELEN);
+ (void)snprintf(name, sizeof(name), "%s (dir %s)",
+ dt->fs_file, directory);
+ (void)strncpy(spcl.c_filesys, name, NAMELEN);
+ disk = rawname(dt->fs_spec);
+ } else {
+ (void)strncpy(spcl.c_dev, disk, NAMELEN);
+ (void)strncpy(spcl.c_filesys, "an unlisted file system",
+ NAMELEN);
+ }