]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: remove the S_ISREG check from blkid_get_topology
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Apr 2024 23:07:47 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:27 +0000 (14:06 -0700)
The only caller already performs the exact same check.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/topology.c

index 63f0b96a56d0a0d8f155ea421d4644ce1b54d349..706eed022767bbc2f74ca8e37c8b385db28673e0 100644 (file)
@@ -178,15 +178,6 @@ blkid_get_topology(
 {
        blkid_topology tp;
        blkid_probe pr;
-       struct stat statbuf;
-
-       /* can't get topology info from a file */
-       if (!stat(device, &statbuf) && S_ISREG(statbuf.st_mode)) {
-               fprintf(stderr,
-       _("%s: Warning: trying to probe topology of a file %s!\n"),
-                       progname, device);
-               return;
-       }
 
        pr = blkid_new_probe_from_filename(device);
        if (!pr)