Re: [PATCH v5 2/2] cifs: Alternate Data Streams: Account for mount option mapchars

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

 



On Mon, Oct 22, 2012 at 12:57 AM, Scott Lovenberg
<scott.lovenberg@xxxxxxxxx> wrote:
> On Mon, Oct 22, 2012 at 1:01 AM, <shirishpargaonkar@xxxxxxxxx> wrote:
>>
>> From: Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx>
> [...]
>> +       int remap;
>> +       char *altstr = NULL;
>> +       struct nls_table *cp;
>> +       struct tcon_link *tlink = NULL;
>> +       struct cifs_tcon *tcon = NULL;
>> +
>> +       cp = cifs_sb->local_nls;
>> +       remap = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR;
>> +
>> +       tlink = cifs_sb_tlink(cifs_sb);
>> +       if (tlink) {
>> +               tcon = tlink_tcon(tlink);
>> +               if (tcon && !(tcon->unix_ext))
>> +                       altstr = strchr(source, ':');
>> +               cifs_put_tlink(tlink);
>> +       }
>>
>> -       if (!mapChars)
>> +       if (!remap || altstr)
>>                 return cifs_strtoUTF16(target, source, PATH_MAX, cp);
>
> Would it make more sense for "remap" to be of type unsigned int or size_t?
>
>
> --
> Peace and Blessings,
> -Scott.

I think variable  remap   of type bool should be sufficient too.

Regards,

Shirish
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux