Re: [patch 1/1] dm: fix printk warnings about whether %lu/%Lu isright for sector_t

From: Andrew Morton
Date: Tue Oct 19 2004 - 19:16:03 EST


Alasdair G Kergon <agk@xxxxxxxxxx> wrote:
>
> On Fri, Oct 08, 2004 at 12:12:39PM -0700, Andrew Morton wrote:
> > I would prefer that SECTOR_FORMAT be removed altogether.
>
> > The industry-standard way of printing a sector_t is:
> > printk("%llu", (unsigned long long)sector);
>
> What about reading a sector_t with sscanf, which looks like the
> reason for the existence of SECTOR_FORMAT?

I'm not sure that it has arisen. I'd do:

unsigned long long temp;
sector_t sector;

sscanf(buf, "%llu", &temp);
sector = temp;

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