lkml.org 
[lkml]   [2007]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [NFS] [PATCH 013 of 20] knfsd: nfsd: factor out code from show_expflags
From
On Fri, Jul 13, 2007 at 12:29:33AM -0700, Andrew Morton wrote:
> On Tue, 10 Jul 2007 12:27:37 +1000 NeilBrown <neilb@suse.de> wrote:
>
> > +static void exp_flags(struct seq_file *m, int flag, int fsid,
> > + uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fsloc)
> > +{
> > + show_expflags(m, flag, NFSEXP_ALLFLAGS);
> > if (flag & NFSEXP_FSID)
> > - seq_printf(m, "%sfsid=%d", first++?",":"", fsid);
> > + seq_printf(m, ",fsid=%d", fsid);
> > if (anonu != (uid_t)-2 && anonu != (0x10000-2))
> > - seq_printf(m, "%sanonuid=%d", first++?",":"", anonu);
> > + seq_printf(m, ",sanonuid=%d", anonu);
>
> It's a bit presumptuous to print a uid_t with "%d". Fortunately it
> will work OK with all the present architectures.
>
> But in general: be cautious when feeding opaque types to printk.

OK, here I'm still confused--what should we be doing instead?

--b.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-19 01:09    [W:0.128 / U:5.972 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site