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 635809 Details for
Bug 871628
[PATCH] fsusage: Fix fetching rootfs stats on Fedora 17
[?]
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.
fsusage: Fix fetching rootfs stats on Fedora 17
0001-fsusage-Fix-fetching-rootfs-stats-on-Fedora-17.patch (text/plain), 1.28 KB, created by
Cole Robinson
on 2012-10-30 21:57:11 UTC
(
hide
)
Description:
fsusage: Fix fetching rootfs stats on Fedora 17
Filename:
MIME Type:
Creator:
Cole Robinson
Created:
2012-10-30 21:57:11 UTC
Size:
1.28 KB
patch
obsolete
>From 76ecd36d9b2be5b882bc56a724c3e9d5f9fb7034 Mon Sep 17 00:00:00 2001 >Message-Id: <76ecd36d9b2be5b882bc56a724c3e9d5f9fb7034.1349884473.git.crobinso@redhat.com> >From: Cole Robinson <crobinso@redhat.com> >Date: Wed, 10 Oct 2012 11:32:18 -0400 >Subject: [PATCH] fsusage: Fix fetching rootfs stats on Fedora 17 > >On Fedora 17, my /etc/mtab has this: > >$ grep " / " /etc/mtab >rootfs / rootfs rw 0 0 >/dev/sda2 / ext4 rw,seclabel,relatime,data=ordered 0 0 > >When fsusage scans mtab, it matches on the first entry, but since 'rootfs' >isn't of the expected format '/dev/<blah>' it bails out. > >Match early on any rootfs entries and skip them. > >Signed-off-by: Cole Robinson <crobinso@redhat.com> >--- > sysdeps/linux/fsusage.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/sysdeps/linux/fsusage.c b/sysdeps/linux/fsusage.c >index 1356494..b186767 100644 >--- a/sysdeps/linux/fsusage.c >+++ b/sysdeps/linux/fsusage.c >@@ -41,6 +41,10 @@ get_device(glibtop* server, const char *mountpoint, > > while ((mnt = getmntent(fp))) > { >+ /* There can be multiple root mount entries, skip the unuseful one */ >+ if (!strcmp(mnt->mnt_fsname, "rootfs")) >+ continue; >+ > if (!strcmp(mountpoint, mnt->mnt_dir)) { > if (!strncmp(mnt->mnt_fsname, "/dev/", 5)) { > g_strlcpy(device, mnt->mnt_fsname + 5, device_size); >-- >1.7.11.4 >
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 Raw
Actions:
View
Attachments on
bug 871628
: 635809