[LTP] [PATCH v2] mem/hugetlb: shift an empty region to use in hugemmap02.c

Jan Stancek jstancek@redhat.com
Tue Oct 13 13:11:41 CEST 2015



----- Original Message -----
> From: "Jan Stancek" <jstancek@redhat.com>
> To: "Li Wang" <liwang@redhat.com>, "Cyril Hrubis" <chrubis@suse.cz>
> Cc: ltp@lists.linux.it
> Sent: Tuesday, 13 October, 2015 12:54:46 PM
> Subject: Re: [LTP] [PATCH v2] mem/hugetlb: shift an empty region to use in hugemmap02.c

> 
> The approach above should work, but it also stores data to buf,
> that we don't care about. You could do fscanf + "while (fgetc(f) != '\n');"
> to forward to next line, if you want to avoid using buf.

OK, I take that back, Cyril's version is prettier:
> 
>                 ret = fscanf(f, "%lx-%lx %*[^\n]\n", &start, &end);



More information about the Ltp mailing list