97 lines
3.7 KiB
Diff
97 lines
3.7 KiB
Diff
|
X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com
|
||
|
X-Spam-Level:
|
||
|
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
|
||
|
T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.4.0-r929098
|
||
|
Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15])
|
||
|
by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q21LELF2187409
|
||
|
for <xfs@oss.sgi.com>; Thu, 1 Mar 2012 15:14:21 -0600
|
||
|
X-ASG-Debug-ID: 1330636459-04cb6c77b78a450001-NocioJ
|
||
|
Received: from MMS3.broadcom.com (mms3.broadcom.com [216.31.210.19]) by cuda.sgi.com with ESMTP id EN5xnXt8f6M6fczc for <xfs@oss.sgi.com>; Thu, 01 Mar 2012 13:14:20 -0800 (PST)
|
||
|
X-Barracuda-Envelope-From: kdasu.kdev@gmail.com
|
||
|
X-Barracuda-Apparent-Source-IP: 216.31.210.19
|
||
|
Received: from [10.9.200.133] by MMS3.broadcom.com with ESMTP (Broadcom
|
||
|
SMTP Relay (Email Firewall v6.3.2)); Thu, 01 Mar 2012 13:23:13 -0800
|
||
|
X-Server-Uuid: B55A25B1-5D7D-41F8-BC53-C57E7AD3C201
|
||
|
Received: from mail-irva-13.broadcom.com (10.11.16.103) by
|
||
|
IRVEXCHHUB02.corp.ad.broadcom.com (10.9.200.133) with Microsoft SMTP
|
||
|
Server id 8.2.247.2; Thu, 1 Mar 2012 13:13:41 -0800
|
||
|
Received: from kdasu-VirtualBox.and.broadcom.com (
|
||
|
dhcp-mhtb-6-210.and.broadcom.com [10.28.6.210]) by
|
||
|
mail-irva-13.broadcom.com (Postfix) with ESMTP id 5FB8BBC395; Thu, 1
|
||
|
Mar 2012 13:14:16 -0800 (PST)
|
||
|
From: "Kamal Dasu" <kdasu.kdev@gmail.com>
|
||
|
To: xfs@oss.sgi.com
|
||
|
cc: "Kamal Dasu" <kdasu.kdev@gmail.com>
|
||
|
Subject: [PATCH 1/2] xfsprogs: replace deprecated ustat call with statfs
|
||
|
in libxfs/linux.c
|
||
|
Date: Thu, 1 Mar 2012 16:11:24 -0500
|
||
|
X-ASG-Orig-Subj: [PATCH 1/2] xfsprogs: replace deprecated ustat call with statfs
|
||
|
in libxfs/linux.c
|
||
|
Message-ID: <de74feb44ebd887269fe85d9a5879765afccf4c2.1330635228.git.kdasu.kdev@gmail.com>
|
||
|
X-Mailer: git-send-email 1.7.5.4
|
||
|
In-Reply-To: <1330636285-11200-1-git-send-email-kdasu.kdev@gmail.com>
|
||
|
References: <1330636285-11200-1-git-send-email-kdasu.kdev@gmail.com>
|
||
|
MIME-Version: 1.0
|
||
|
X-WSS-ID: 6351374B50429576722-01-01
|
||
|
Content-Type: text/plain
|
||
|
Content-Transfer-Encoding: 7bit
|
||
|
X-Barracuda-Connect: mms3.broadcom.com[216.31.210.19]
|
||
|
X-Barracuda-Start-Time: 1330636460
|
||
|
X-Barracuda-URL: http://192.48.176.15:80/cgi-mod/mark.cgi
|
||
|
X-Virus-Scanned: by bsmtpd at sgi.com
|
||
|
X-Barracuda-Spam-Score: 0.00
|
||
|
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.3 tests=
|
||
|
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.89996
|
||
|
Rule breakdown below
|
||
|
pts rule name description
|
||
|
---- ---------------------- --------------------------------------------------
|
||
|
|
||
|
>From the ustat man page
|
||
|
|
||
|
NOTES
|
||
|
ustat() is deprecated and has only been provided for compatibility.
|
||
|
All new programs should use statfs(2) instead.
|
||
|
|
||
|
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
|
||
|
---
|
||
|
libxfs/linux.c | 8 +++++---
|
||
|
1 files changed, 5 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/libxfs/linux.c b/libxfs/linux.c
|
||
|
index 2e07d54..b8cc028 100644
|
||
|
--- a/libxfs/linux.c
|
||
|
+++ b/libxfs/linux.c
|
||
|
@@ -21,7 +21,9 @@
|
||
|
#include <mntent.h>
|
||
|
#include <sys/stat.h>
|
||
|
#undef ustat
|
||
|
-#include <sys/ustat.h>
|
||
|
+#include <sys/statfs.h>
|
||
|
+#include <sys/types.h>
|
||
|
+
|
||
|
#include <sys/mount.h>
|
||
|
#include <sys/ioctl.h>
|
||
|
#include <sys/sysinfo.h>
|
||
|
@@ -50,7 +52,7 @@ int
|
||
|
platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
|
||
|
{
|
||
|
/* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
|
||
|
- struct ustat ust[2];
|
||
|
+ struct statfs fst;
|
||
|
struct stat64 st;
|
||
|
|
||
|
if (!s) {
|
||
|
@@ -61,7 +63,7 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
|
||
|
s = &st;
|
||
|
}
|
||
|
|
||
|
- if (ustat(s->st_rdev, ust) >= 0) {
|
||
|
+ if (statfs(block, &fst) >= 0) {
|
||
|
if (verbose)
|
||
|
fprintf(stderr,
|
||
|
_("%s: %s contains a mounted filesystem\n"),
|
||
|
--
|
||
|
1.7.5.4
|
||
|
|
||
|
|