On Tue, 2014-11-25 at 02:11 +0000, boris wrote: > Hi all, > > I was looking for a quick method of testing whether a working directory is a > subvolume. > > Couldn't see an obvious one, so tried 'btrfs show <somesubvol≥'. It printed > a fail message as expected but returned 0 exit status. Bug?
Hi boris, I take a quick look at the code branch and I think it is a Bug indeed. THe code just forgot to set the proper return value before leave out. To test whether a dir is a subvolume, what about # btrfs sub list | grep <dirname> as 'btrfs sub list will list all subvolumes under <mntpoint>. The dirname should be relative path under <mntpoint> is as I could remember. Thanks, Gui > Can I put in a feature request for a shell file test operator for subvols, > please (or something of the kind)? http://tldp.org/LDP/abs/html/fto.html . > The letter v (for volume, both upper and lower case forms; one for subvol, > other for snapshots) is unused afaict. > > Have I missed the obvious? Or scored a false positive? > > TIA. > > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html