Re: fallocate: --punch option parsing error diagnostics irritating

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

 



On Wed, Jun 25, 2014 at 10:16:54PM +0200, Bernhard Voelker wrote:
>   $ ./fallocate -p -l 10000 /tmp/x
>   fallocate: only -n mode can be used with --zero-range
> 
> Huh? I didn't specify neither -n nor -z.

		case 'p':
			mode |= FALLOC_FL_PUNCH_HOLE;
			/* fall through */
		case 'n':
			mode |= FALLOC_FL_KEEP_SIZE;
			break;


unfortunately there is nothing about it in man page and usage(). It's
described in fallocate(2) syscall man page only.

Anyway, the code is wrong, it assumes that KEEP_SIZE is possible to use
only with ZERO_RANGE. 

Fixed in git tree, man page massively modified to be readable for
humans (original text in the man page was from FS devels:-)

> Finally, please add some examples to the man page.

I think the new version of the man page is good enough without examples, but 
if someone has something nice we can add EXAMPLES section.

Thanks!

    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