Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 310378 Details for
Bug 452273
/sys vfs block device stat fields have changed
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
upstream fix for F-8 branch
libgtop-2.20-fsusage.patch (text/plain), 2.19 KB, created by
Michael Schwendt
on 2008-06-26 20:35:35 UTC
(
hide
)
Description:
upstream fix for F-8 branch
Filename:
MIME Type:
Creator:
Michael Schwendt
Created:
2008-06-26 20:35:35 UTC
Size:
2.19 KB
patch
obsolete
>diff -Nur libgtop-2.20.1-orig/sysdeps/linux/fsusage.c libgtop-2.20.1/sysdeps/linux/fsusage.c >--- libgtop-2.20.1-orig/sysdeps/linux/fsusage.c 2007-09-27 22:34:52.000000000 +0200 >+++ libgtop-2.20.1/sysdeps/linux/fsusage.c 2008-06-26 20:20:04.000000000 +0200 >@@ -62,9 +62,35 @@ > } > > >+/* >+ Bug #539360. >+ /sys/.../stat format is partially defined in >+ linux/Documentation/block/stat.txt (looks outdated). Before linux >+ 2.5.25, /sys/block/%s/stat and /sys/block/%s/%s/stat were not the >+ same, but the following commit changed the latter to have the same >+ format and broke compatibility. >+ >+ Commit 34e8beac92c27d292938065f8375842d2840767c >+ Author: Jerome Marchand <jmarchan@redhat.com> >+ Date: Fri Feb 8 11:04:55 2008 +0100 >+ >+ Enhanced partition statistics: sysfs >+ >+ Reports enhanced partition statistics in sysfs. >+ >+ Signed-off-by: Jerome Marchand <jmarchan@redhat.com> >+ >+ fs/partitions/check.c | 22 +++++++++++++++++++--- >+ 1 files changed, 19 insertions(+), 3 deletions(-) >+ >+ */ >+ > static void >-get_sys_path(const char *device, char **stat_path, const char **parse_format) >+get_sys_path(glibtop* server, const char *device, char **stat_path, const char **parse_format) > { >+ const char* linux_2_6_25_format = "%*llu %*llu %llu %*llu" >+ "%*llu %*llu %llu %*llu"; >+ > if(g_str_has_prefix(device, "hd") || g_str_has_prefix(device, "sd")) > { > char *prefix; >@@ -82,12 +108,18 @@ > g_free(prefix); > > *stat_path = path; >- *parse_format = "%*llu %llu %*llu %llu"; >+ if (server->os_version_code < LINUX_VERSION_CODE(2, 6, 25)) >+ *parse_format = "%*llu %llu %*llu %llu"; >+ else >+ *parse_format = linux_2_6_25_format; > } > else > { > *stat_path = g_strdup_printf("/sys/block/%s/stat", device); >- *parse_format = "%*llu %*llu %llu %*llu %*llu %*llu %llu"; >+ if (server->os_version_code < LINUX_VERSION_CODE(2, 6, 25)) >+ *parse_format = "%*llu %*llu %llu %*llu %*llu %*llu %llu"; >+ else >+ *parse_format = linux_2_6_25_format; > } > } > >@@ -104,7 +136,7 @@ > device = get_partition(path); > if(!device) return; > >- get_sys_path(device, &filename, &format); >+ get_sys_path(server, device, &filename, &format); > g_free(device); > > ret = try_file_to_buffer(buffer, sizeof buffer, filename);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 452273
: 310378