~ubuntu-branches/ubuntu/edgy/xfsprogs/edgy

« back to all changes in this revision

Viewing changes to io/file.c

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2005-11-16 16:32:35 UTC
  • Revision ID: james.westby@ubuntu.com-20051116163235-synnef6xjj18ny42
Tags: 2.7.7-1
* New upstream release.
* Add support for (optional) ATTR2 format extension (closes: #336350)
* Allow gcc -pedantic option for C++ <xfs.h> users (closes: #249429)
* Fix segv in xfs_db frag command (closes: #338207)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2004-2005 Silicon Graphics, Inc.  All Rights Reserved.
 
2
 * Copyright (c) 2004-2005 Silicon Graphics, Inc.
 
3
 * All Rights Reserved.
3
4
 *
4
 
 * This program is free software; you can redistribute it and/or modify it
5
 
 * under the terms of version 2 of the GNU General Public License as
 
5
 * This program is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU General Public License as
6
7
 * published by the Free Software Foundation.
7
8
 *
8
 
 * This program is distributed in the hope that it would be useful, but
9
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
 
 *
12
 
 * Further, this software is distributed without any warranty that it is
13
 
 * free of the rightful claim of any third person regarding infringement
14
 
 * or the like.  Any license provided herein, whether implied or
15
 
 * otherwise, applies only to this software file.  Patent licenses, if
16
 
 * any, provided herein do not apply to combinations of this program with
17
 
 * other software, or any other product whatsoever.
18
 
 *
19
 
 * You should have received a copy of the GNU General Public License along
20
 
 * with this program; if not, write the Free Software Foundation, Inc., 59
21
 
 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
22
 
 *
23
 
 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24
 
 * Mountain View, CA  94043, or:
25
 
 *
26
 
 * http://www.sgi.com
27
 
 *
28
 
 * For further information regarding this notice, see:
29
 
 *
30
 
 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 
9
 * This program is distributed in the hope that it would be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write the Free Software Foundation,
 
16
 * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
31
17
 */
32
18
 
33
 
#include <xfs/libxfs.h>
 
19
#include <xfs/xfs.h>
 
20
#include <xfs/command.h>
 
21
#include <xfs/input.h>
34
22
#include <sys/mman.h>
35
 
#include "command.h"
36
 
#include "input.h"
37
23
#include "init.h"
38
24
#include "io.h"
39
25
 
50
36
        int             index,
51
37
        int             braces)
52
38
{
53
 
        printf(_("%c%03d%c %-14s (%s,%s,%s,%s%s%s)\n"),
 
39
        printf(_("%c%03d%c %-14s (%s,%s,%s,%s%s%s%s)\n"),
54
40
                braces? '[' : ' ', index, braces? ']' : ' ', file->name,
55
41
                file->flags & IO_FOREIGN ? _("foreign") : _("xfs"),
56
42
                file->flags & IO_OSYNC ? _("sync") : _("non-sync"),
57
43
                file->flags & IO_DIRECT ? _("direct") : _("non-direct"),
58
44
                file->flags & IO_READONLY ? _("read-only") : _("read-write"),
59
45
                file->flags & IO_REALTIME ? _(",real-time") : "",
60
 
                file->flags & IO_APPEND ? _(",append-only") : "");
 
46
                file->flags & IO_APPEND ? _(",append-only") : "",
 
47
                file->flags & IO_NONBLOCK ? _(",non-block") : "");
61
48
}
62
49
 
63
50
int