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

« back to all changes in this revision

Viewing changes to io/imap.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) 2001-2003,2005 Silicon Graphics, Inc.  All Rights Reserved.
 
2
 * Copyright (c) 2001-2003,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>
34
 
#include "command.h"
35
 
#include "input.h"
 
19
#include <xfs/xfs.h>
 
20
#include <xfs/command.h>
 
21
#include <xfs/input.h>
36
22
#include "init.h"
37
23
#include "io.h"
38
24
 
39
 
#if defined(__sgi__)
40
 
# define ino64p         ino64_t *
41
 
#else
42
 
# define ino64p         __u64 *
43
 
#endif
44
 
 
45
25
static cmdinfo_t imap_cmd;
46
26
 
47
27
int
50
30
        int             count;
51
31
        int             nent;
52
32
        int             i;
53
 
        __s64           last = 0;
 
33
        __u64           last = 0;
54
34
        xfs_inogrp_t    *t;
55
35
        xfs_fsop_bulkreq_t bulkreq;
56
36
 
61
41
 
62
42
        t = malloc(nent * sizeof(*t));
63
43
 
64
 
        bulkreq.lastip  = (ino64p)&last;
 
44
        bulkreq.lastip  = &last;
65
45
        bulkreq.icount  = nent;
66
46
        bulkreq.ubuffer = (void *)t;
67
47
        bulkreq.ocount  = &count;