]>
Commit | Line | Data |
---|---|---|
96893471 | 1 | --- e2fsprogs-1.19/misc/get_device_by_label.c.or Sun Apr 15 19:20:01 2001 |
2 | +++ e2fsprogs-1.19/misc/get_device_by_label.c Sun Apr 15 19:50:32 2001 | |
3 | @@ -96,6 +96,10 @@ | |
4 | char device[110]; | |
5 | int firstPass; | |
6 | int handleOnFirst; | |
7 | + enum { | |
8 | + CBBUF = 16 * 1024 | |
9 | + }; | |
10 | + char *iobuf = 0; | |
11 | ||
12 | if (uuidCache) | |
13 | return; | |
14 | @@ -104,6 +108,11 @@ | |
15 | if (!procpt) | |
16 | return; | |
17 | ||
18 | + iobuf = (char *)malloc(CBBUF); | |
19 | + if (iobuf) { | |
20 | + setvbuf(procpt, iobuf, _IOFBF, CBBUF); | |
21 | + } | |
22 | + | |
23 | for (firstPass = 1; firstPass >= 0; firstPass--) { | |
24 | fseek(procpt, 0, SEEK_SET); | |
25 | ||
26 | @@ -144,6 +153,9 @@ | |
27 | } | |
28 | ||
29 | fclose(procpt); | |
30 | + if (iobuf) { | |
31 | + free(iobuf); | |
32 | + } | |
33 | } | |
34 | ||
35 | #define UUID 1 |