Re: [PATCH] btrfs-progs: subvolume: outputs message only when operation succeeds

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

 



On 25/09/17 11:08, Qu Wenruo wrote:
What about redirecting stdout to /dev/null and redirecting stderr to mail if return value is not 0?
s/if return value is not 0/if return value is 0/.

The main point is, if btrfs returns 0, then nothing to worry about.
(Unless there is a bug, even in that case keep an eye on stderr should be enough to catch that)

Redirection to /dev/null will work. However,

1) It will always looks suspicious. grep -v with expected message is at least clear about its intent and consequences.

2) Although shorter than grep -v, it will still take space in shell scripts and force one to remember btrfs commands one has to add it after. This is already inconvenient enough to want a fix.

--

With Best Regards,
Marat Khalili
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux