Package init
This commit is contained in:
parent
8330d04949
commit
8f0025ab9f
@ -91,7 +91,7 @@ index 6387012..91de9f9 100644
|
|||||||
+ lxcfs_error("Error opening pipe for reading: %s\n", strerror(errno));
|
+ lxcfs_error("Error opening pipe for reading: %s\n", strerror(errno));
|
||||||
+ goto err;
|
+ goto err;
|
||||||
+ }
|
+ }
|
||||||
+ while (fscanf(stream, "%s%d", dev_name, &dev_num) == 2) {
|
+ while (fscanf(stream, "%100s%d", dev_name, &dev_num) == 2) {
|
||||||
+ if (dev_num == 0) {
|
+ if (dev_num == 0) {
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
@ -657,8 +657,8 @@ index 9b9f180..b921d7e 100644
|
|||||||
lxcfs_error("Error opening pipe for reading: %s\n", strerror(errno));
|
lxcfs_error("Error opening pipe for reading: %s\n", strerror(errno));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
- while (fscanf(stream, "%s%d", dev_name, &dev_num) == 2) {
|
- while (fscanf(stream, "%100s%d", dev_name, &dev_num) == 2) {
|
||||||
+ while (fscanf(stream[0], "%s%d", dev_name, &dev_num) == 2) {
|
+ while (fscanf(stream[0], "%100s%d", dev_name, &dev_num) == 2) {
|
||||||
if (dev_num == 0) {
|
if (dev_num == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ index b921d7e..1023e7f 100644
|
|||||||
}
|
}
|
||||||
+ wait_for_pid(child_pid);
|
+ wait_for_pid(child_pid);
|
||||||
+ child_pid = 0;
|
+ child_pid = 0;
|
||||||
while (fscanf(stream[0], "%s%d", dev_name, &dev_num) == 2) {
|
while (fscanf(stream[0], "%100s%d", dev_name, &dev_num) == 2) {
|
||||||
if (dev_num == 0) {
|
if (dev_num == 0) {
|
||||||
break;
|
break;
|
||||||
@@ -4148,7 +4161,9 @@ static int proc_diskstats_read(char *buf, size_t size, off_t offset,
|
@@ -4148,7 +4161,9 @@ static int proc_diskstats_read(char *buf, size_t size, off_t offset,
|
||||||
|
|||||||
@ -63,7 +63,7 @@ diff --git a/bindings.c b/bindings.c
|
|||||||
write, write_merged, write_sectors, write_ticks, ios_pgr, tot_ticks, rq_ticks);
|
write, write_merged, write_sectors, write_ticks, ios_pgr, tot_ticks, rq_ticks);
|
||||||
- else
|
- else
|
||||||
+ else if (need_record_diskstats(major, minor)) {
|
+ else if (need_record_diskstats(major, minor)) {
|
||||||
+ sscanf(line, "%u %u %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
|
+ sscanf(line, "%u %u %71s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
|
||||||
+ &major, &minor, tmp_dev_name, &read, &read_merged, &read_sectors, &read_ticks,
|
+ &major, &minor, tmp_dev_name, &read, &read_merged, &read_sectors, &read_ticks,
|
||||||
+ &write, &write_merged, &write_sectors, &write_ticks, &ios_pgr, &tot_ticks, &rq_ticks);
|
+ &write, &write_merged, &write_sectors, &write_ticks, &ios_pgr, &tot_ticks, &rq_ticks);
|
||||||
+ snprintf(lbuf, 256, "%u %u %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
|
+ snprintf(lbuf, 256, "%u %u %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user