Re: sfdisk: return value when re-reading partition table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 03, 2011 at 11:57:08AM +0200, Andrea Galbusera wrote:
> Hi,
> I hit this while writing a shell script for automatically partition a device.
> 
> Is there any particular reason for sfdisk to return 0, even when
> re-reading the partition table fails with the following message? I
> could find no explicit reason neither in the man page nor in this
> list's archives.
> 
> Re-reading the partition table ...
> BLKRRPART: Device or resource busy
> The command to re-read the partition table failed.
> Run partprobe(8), kpartx(8) or reboot your system now,
> before using mkfs
> 
> This is not a matter of why re-reading fails. Just wondering why this
> condition if not reported with a non-zero return value to the shell.
> Same result when calling sfdisk with -R on a in-use partition.
> 
> If I miss a particular explanation behind this, please let me know.
> Otherwise I can try to submit a patch making sfdisk return 1 on
> failing re-read operations.

Please, send a patch (for example fdisk(8) returns non-zero on failed
BLKRRPART ioctl).

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux