Merge of master-melb:xfs-cmds:24375a by kenmcd.
enum {
DEFAULT_TIME = 0x0,
TERSE_FIXED_TIME = 0x1,
- VERBOSE_FIXED_TIME = 0x2,
+ VERBOSE_FIXED_TIME = 0x2
};
extern void timestr(struct timeval *tv, char *str, size_t sz, int flags);
#ifndef __GNUC__
#define __sgi__ __sgi
#define __inline__ __inline
+#define inline __inline
#endif
#define constpp char * const *
#ifndef __PATH_H__
#define __PATH_H__
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
/*
* XFS Filesystem Paths
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include "init.h"
#include "io.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include "init.h"
#include "io.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/time.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
progname, path, strerror(errno));
} else {
if (getprojid(path, fd, &projid) == 0)
- printf("[%u] %s\n", projid, path);
+ printf("[%u] %s\n", (unsigned int)projid, path);
close(fd);
}
return 0;
else if (getprojid(file->name, file->fd, &projid) < 0)
perror("getprojid");
else
- printf(_("projid = %u\n"), projid);
+ printf(_("projid = %u\n"), (unsigned int)projid);
return 0;
}
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <ctype.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/sendfile.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
-
-/* attributes.h (purposefully) unavailable to xfsprogs, make do */
-struct attrlist_cursor { __u32 opaque[4]; };
-
+#include <xfs/xfs.h>
#include <xfs/handle.h>
/* just pick a value we know is more than big enough */
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
-
-/* attributes.h (purposefully) unavailable to xfsprogs, make do */
-struct attrlist_cursor { __u32 opaque[4]; };
-
+#include <xfs/xfs.h>
#include <xfs/handle.h>
#include <xfs/jdm.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
#include <xfs/input.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
static cmdinfo_t help_cmd;
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/input.h>
#if defined(ENABLE_READLINE)
# include <histedit.h>
#endif
+extern char *progname;
+
static char *
get_prompt(void)
{
prid_t prid;
char *sp;
- prid = strtoul(project, &sp, 10);
+ prid = (prid_t)strtoul(project, &sp, 10);
if (sp != project)
return prid;
prj = getprnam(project);
uid_t uid;
char *sp;
- uid = strtoul(user, &sp, 10);
+ uid = (uid_t)strtoul(user, &sp, 10);
if (sp != user)
return uid;
pwd = getpwnam(user);
gid_t gid;
char *sp;
- gid = strtoul(group, &sp, 10);
+ gid = (gid_t)strtoul(group, &sp, 10);
if (sp != group)
return gid;
grp = getgrnam(group);
#include <xfs/input.h>
#include <xfs/project.h>
+extern char *progname;
+
int fs_count;
struct fs_path *fs_table;
struct fs_path *fs_path;
char **logp,
char **rtp)
{
- char *fslog, *fsrt, *fslogend, *fsrtend;
-
- fslog = fsrt = fslogend = fsrtend = NULL;
+ char *fslog, *fsrt;
/* Extract log device and realtime device from mount options */
if ((fslog = hasmntopt(mnt, "logdev=")))
/* Do this only after we've finished processing mount options */
if (fslog) {
- fslogend = strtok(fslog, " ,");
+ strtok(fslog, " ,");
fslog = strdup(fslog);
}
if (fsrt) {
- fsrtend = strtok(fsrt, " ,");
+ strtok(fsrt, " ,");
fsrt = strdup(fsrt);
}
if (!projects)
return NULL;
- do {
+ for (;;) {
if (!fgets(projects_buffer, size, projects))
break;
/*
p.pr_prid = atoi(idstart+1);
p.pr_name = &projects_buffer[0];
return &p;
- } while (1);
+ }
return NULL;
}
if (!project_paths)
return NULL;
- do {
+ for (;;) {
if (!fgets(project_paths_buffer, size, project_paths))
break;
/*
pp.pp_pathname = nmstart + 1;
pp.pp_prid = atoi(&project_paths_buffer[0]);
return &pp;
- } while (1);
+ }
return NULL;
}
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
+#include <xfs/xfs.h>
#include <xfs/command.h>
static cmdinfo_t quit_cmd;
+/* ARGSUSED */
static int
quit_f(
int argc,
\f3xfs_io\f1 [ \f3\-c\f1 cmd ] ... [ \f3\-p\f1 prog ] [ \f3\-adFfmrRstx\f1 ] file
.fi
.SH DESCRIPTION
-\f2xfs_io\f1 is a debugging tool like \f2xfs_db\f1(8), but is aimed
+\f2xfs_io\f1 is a debugging tool like \f2xfs_db\f1, but is aimed
at examining the regular file I/O path rather than the raw XFS volume
itself.
.PP
.TP
\f3bmap\f1 [ \f2\-adlpv\f1 ] [ \f2\-n nx\f1 ]
Prints the block mapping for the current open file.
-Refer to \f2xfs_bmap\f1(8) for complete documentation.
+Refer to the \f2xfs_bmap\f1 manual page for complete documentation.
.TP
\f3allocsp\f1 \f2offset\f1 \f2length\f1
Allocates zeroed space for part of a file using the XFS_IOC_ALLOCSP
-system call described in \f2xfs\f1(5).
+system call described in the \f2xfs\f1 manual page.
.TP
\f3freesp\f1 \f2offset\f1 \f2length\f1
Frees space for part of a file using the XFS_IOC_FREESP
-system call described in \f2xfs\f1(5).
+system call described in the \f2xfs\f1 manual page.
.TP
\f3fadvise\f1 [ \f2\-dnrsw\f1 ]
On platforms which support it, allows hints be given to the system
.TP
\f3resvsp\f1 \f2offset\f1 \f2length\f1
Allocates reserved, unwritten space for part of a file using the XFS_IOC_RESVSP
-system call described in \f2xfs\f1(5).
+system call described in the \f2xfs\f1 manual page.
.TP
\f3unresvsp\f1 \f2offset\f1 \f2length\f1
Frees reserved space for part of a file using the XFS_IOC_UNRESVSP
-system call described in \f2xfs\f1(5).
+system call described in the \f2xfs\f1 manual page.
.TP
\f3truncate\f1 \f2offset\f1
Truncates the current file at the given offset using \f2ftruncate\f1(2).
.TP
\f3resblks\f1 [ \f2blocks\f1 ]
Get and/or set count of reserved filesystem blocks using the
-XFS_IOC_GET_RESBLKS or XFS_IOC_SET_RESBLKS system calls,
-as described in \f2xfs\f1(5).
+XFS_IOC_GET_RESBLKS or XFS_IOC_SET_RESBLKS system calls.
Note \-\- this can be useful for exercising out of space behavior.
Only available in expert mode and requires privileges.
.TP
.TP
\f3stat\f1 [ \f2\-v\f1 ]
Selected statistics from \f2stat\f1(2) and the XFS_IOC_GETXATTR
-system call from \f2xfs\f1(5) on the current file.
+system call on the current file.
If the \f2-v\f1 option is specified, the atime (last access), mtime
(last modify), and ctime (last change) timestamps are also displayed.
.TP
\f3statfs\f1
Selected statistics from \f2statfs\f1(2) and the XFS_IOC_FSGEOMETRY
-system call from \f2xfs\f1(5) on the filesystem where the current
-file resides.
+system call on the filesystem where the current file resides.
+
+.SH IRIX SEE ALSO
+mkfs_xfs(1M),
+syssgi(2),
+xfs_bmap(1M),
+xfs_db(1M),
+xfs(4).
+
+.SH LINUX SEE ALSO
+mkfs.xfs(8),
+xfsctl(3),
+xfs_bmap(8),
+xfs_db(8),
+xfs(5).
.SH SEE ALSO
fdatasync(2),
fstatfs(2),
fsync(2),
ftruncate(2),
-mkfs.xfs(8),
mmap(2),
open(2),
pread(2),
-pwrite(2),
-xfs_bmap(8),
-xfs_db(8),
-xfs(5).
+pwrite(2).
As such, it is administered differently, in particular:
.TP
1.
-.BR quotacheck (8)
-has no effect on XFS filesystems.
+The
+.B quotacheck
+command has no effect on XFS filesystems.
The first time quota accounting is turned on (at mount time), XFS does
an automatic quotacheck internally; afterwards, the quota system will
always be completely consistent until quotas are manually turned off.
However, it is possible to turn on/off limit enforcement any time
quota accounting is turned on.
The "quota" option to the
-.BR mount (8)
+.B mount
command turns on both (user) quota accounting and enforcement.
The "uqnoenforce" option must be used to turn on user accounting with
limit enforcement disabled.
Turning on quotas on the root filesystem is slightly different from
the above.
For IRIX XFS, refer to
-.BR quotaon (1)
+.BR quotaon (1M).
For Linux XFS, the quota mount flags must be passed in with the
"rootflags=" boot parameter.
.TP
.TP
6.
There is a mechanism built into
-.BR xfsdump (8)
+.B xfsdump
that allows quota limit information to be backed up for later
restoration, should the need arise.
.TP
.BR /etc/projid
Mapping of numeric project identifiers to project names.
.PD
+.SH IRIX SEE ALSO
+quotaon(1M),
+xfs(4).
+
+.SH LINUX SEE ALSO
+warnquota(8),
+xfs(5).
+
.SH SEE ALSO
df(1),
mount(1),
sync(2),
-xfs(5).
if (fsx.fsx_projid != prid)
printf(_("%s - project identifier is not set"
" (inode=%u, tree=%u)\n"),
- path, fsx.fsx_projid, prid);
+ path, fsx.fsx_projid, (unsigned int)prid);
if (!(fsx.fsx_xflags & XFS_XFLAG_PROJINHERIT))
printf(_("%s - project inheritance flag is not set\n"),
path);
if ((p = getprprid(prid)))
return p->pr_name;
- snprintf(buffer, sizeof(buffer), "#%u", prid);
+ snprintf(buffer, sizeof(buffer), "#%u", (unsigned int)prid);
return &buffer[0];
}
setprent();
while ((p = getprent()) != NULL) {
if (flags & NO_LOOKUP_FLAG)
- snprintf(n, sizeof(n)-1, "#%u", p->pr_prid);
+ snprintf(n, sizeof(n)-1, "#%u",
+ (unsigned int)p->pr_prid);
else
strncpy(n, p->pr_name, sizeof(n)-1);
if (report_mount(fp, p->pr_prid, n,
#include <pwd.h>
#include <grp.h>
#include <utmp.h>
+#include "init.h"
#include "quota.h"
#define SECONDS_IN_A_DAY (24 * 60 * 60)