Re: [PATCH] mount: Automagically detect and loop-mount regular files.

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

 



On Sat, 2010-01-09 at 01:05 +0100, Guillem Jover wrote:

> > +  if (!*loop) {
> > +    struct stat st_buf;
> > +    stat(*spec, &st_buf);
> > +    *loop = S_ISREG(st_buf.st_mode);
> 
> Shouldn't you check if stat was successful before using st_buf?

Yeah, I suppose.  I think we've already stat'd the file once before
this, so I doubt it'd ever fail, but might as well be sure.

New patch in a moment.

- ajax

Attachment: signature.asc
Description: This is a digitally signed message part


[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