[LTP] [PATCH v2] commands/mkfs: Added new testcase to test mkfs(8) command.
    Guangwen Feng 
    fenggw-fnst@cn.fujitsu.com
       
    Wed Nov  4 06:37:45 CET 2015
    
    
  
Hi!
>> +mkfs_verify_type()
>> +{
>> +    if [ -z "$1" ]; then
>> +        blkid $2 | grep -q "ext2"
>> +    else
>> +        blkid $2 | grep -q "$1"
>> +    fi
>> +}
> 
> Hi, how about:
> mkfs_verify_type()
> {
>     if [ -z "$1" ]; then
>         blkid $2 -t TYPE="ext2"
>     else
>         blkid $2 -t TYPE="$1"
>     fi
> }
> 
It looks better since it's more logical, thanks!
    
    
More information about the Ltp
mailing list