On Tue, Feb 03, 2015 at 03:07:13PM -0800, Jaegeuk Kim wrote:
> This is to detect whether filesystem supports shutdown feature or not.
> 
> Signed-off-by: Jaegeuk Kim <[email protected]>
> ---
>  common/rc | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index 5377ba0..438cd51 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2320,6 +2320,17 @@ _require_freeze()
>       [ $result -eq 0 ] || _notrun "$FSTYP does not support freezing"
>  }
>  
> +# Does shutdown work on this fs?
> +_require_scratch_shutdown()
> +{
> +     [ -x src/godown ] || _notrun "src/godown executable not found"
> +
> +        _scratch_mount

Whitespace damage. Also, the state of the scratch device is
undefined until scratch_mkfs is run.

> +     src/godown -v -f $SCRATCH_MNT >/dev/null 2>&1 \
> +             || _notrun "$FSTYP does not support shutdown"

Why verbose if you are redirecting all output to /dev/null?

> +     _scratch_unmount
> +}

Cheers,

Dave.
-- 
Dave Chinner
[email protected]

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to