]>
Commit | Line | Data |
---|---|---|
d5aef51d AM |
1 | diff -urNp -x '*.orig' util-linux-2.36.2.org/disk-utils/blockdev.c util-linux-2.36.2/disk-utils/blockdev.c |
2 | --- util-linux-2.36.2.org/disk-utils/blockdev.c 2021-02-02 16:41:37.962357499 +0100 | |
3 | +++ util-linux-2.36.2/disk-utils/blockdev.c 2021-02-28 14:22:07.717508138 +0100 | |
4 | @@ -431,6 +431,7 @@ static void report_all_devices(void) | |
5 | char ptname[200 + 1]; | |
f212f39a | 6 | char device[210]; |
7 | int ma, mi, sz; | |
8 | + char iobuf[32*1024]; | |
9 | ||
d5aef51d AM |
10 | procpt = fopen(_PATH_PROC_PARTITIONS, "r"); |
11 | if (!procpt) | |
12 | @@ -444,6 +445,7 @@ static void report_all_devices(void) | |
23b3a521 | 13 | snprintf(device, sizeof(device), "/dev/%s", ptname); |
d5aef51d | 14 | report_device(device, 1); |
f212f39a | 15 | } |
16 | + setvbuf(procpt, iobuf, _IOFBF, sizeof(iobuf)); | |
17 | ||
d5aef51d AM |
18 | fclose(procpt); |
19 | } | |
20 | diff -urNp -x '*.orig' util-linux-2.36.2.org/disk-utils/fdisk-list.c util-linux-2.36.2/disk-utils/fdisk-list.c | |
21 | --- util-linux-2.36.2.org/disk-utils/fdisk-list.c 2021-02-12 12:32:01.733988782 +0100 | |
22 | +++ util-linux-2.36.2/disk-utils/fdisk-list.c 2021-02-28 14:22:07.717508138 +0100 | |
23 | @@ -320,6 +320,7 @@ done: | |
c7c0c6cb | 24 | char *next_proc_partition(FILE **f) |
971f9098 | 25 | { |
971f9098 | 26 | char line[128 + 1]; |
c7c0c6cb | 27 | + static char iobuf[32*1024]; |
971f9098 | 28 | |
c7c0c6cb JB |
29 | if (!*f) { |
30 | *f = fopen(_PATH_PROC_PARTITIONS, "r"); | |
d5aef51d | 31 | @@ -327,6 +328,7 @@ char *next_proc_partition(FILE **f) |
c7c0c6cb JB |
32 | warn(_("cannot open %s"), _PATH_PROC_PARTITIONS); |
33 | return NULL; | |
34 | } | |
35 | + setvbuf(*f, iobuf, _IOFBF, sizeof(iobuf)); | |
36 | } | |
971f9098 | 37 | |
c7c0c6cb | 38 | while (fgets(line, sizeof(line), *f)) { |