mkfs: fix mkfs when blkid fails
PATCH 1/1 mkfs: fix mkfs when blkid fails
When trying to mkfs something that blkid doesn't grok:
# mkfs.xfs fsfile warning: unable to probe device toplology for device fsfile illegal sector size 0 Usage: mkfs.xfs ...
mkfs fails. :(
Brown-paper-bag: Eric Sandeen <[email protected]>
Signed-off-by Eric Sandeen <[email protected]>
---
mkfs/xfs_mkfs.c +1 -1
@@ -1574,7 +1574,7 @@ main(* Unless specified manually on the command line use the * advertised sector size of the device. */ - sectorsize = ft.sectorsize; + sectorsize = ft.sectorsize ? ft.sectorsize :XFS_MIN_SECTORSIZE ; }if (ft.sectoralign || !ssflag) {
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 9 lines · Eric Sandeen
When trying to mkfs something that blkid doesn't grok:
# mkfs.xfs fsfile warning: unable to probe device toplology for device fsfile illegal sector size 0 Usage: mkfs.xfs ...mkfs fails. :(
The fix looks good.
Quoted 3 lines
Brown-paper-bag: Eric Sandeen <[email protected]>
Signed-off-by Eric Sandeen <[email protected]>---
Reviewed-by Alex Elder <[email protected]>
Quoted 14 lines
mkfs/xfs_mkfs.c +1
-1@@ -1574,7 +1574,7 @@ main(* Unless specified manually on the command line use the * advertised sector size of the device. */ - sectorsize = ft.sectorsize; + sectorsize = ft.sectorsize ? ft.sectorsize :XFS_MIN_SECTORSIZE ; }if (ft.sectoralign || !ssflag) {
Quoted 4 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs