Coda Distributed File System
coda-src
vtools
coda_replay.h
Go to the documentation of this file.
1
/* BLURB gpl
2
3
Coda File System
4
Release 6
5
6
Copyright (c) 1987-2003 Carnegie Mellon University
7
Additional copyrights listed below
8
9
This code is distributed "AS IS" without warranty of any kind under
10
the terms of the GNU General Public Licence Version 2, as shown in the
11
file LICENSE. The technical and financial contributors to Coda are
12
listed in the file CREDITS.
13
14
Additional copyrights
15
none currently
16
17
#*/
18
19
/* The following is taken from tar(5). */
20
21
/* The operation is effectively encoded in the linkflag field. */
22
/* We extend the use of this field to accommodate additional operations. */
23
/* The new encoding is: */
24
/* '\0' : StoreData, Create */
25
/* '1' : Link */
26
/* '2' : Symlink */
27
/* '3' : StoreStatus */
28
/* '4' : Remove */
29
/* '5' : Rename */
30
/* '6' : Mkdir */
31
/* '7' : Rmdir */
32
33
/* Notes: */
34
/* 1. Tar understands only codes '0', '1', '2'. */
35
/* 2. For rename, name :: to, linkname :: from. */
36
/* 3. Gid is normally -1. Gid of 0 indicates name overflow. */
37
38
#define TBLOCK 512
39
#define NBLOCK 20
40
#define NAMSIZ 100
41
42
union
hblock
{
43
char
dummy
[
TBLOCK
];
44
struct
header
{
45
char
name
[
NAMSIZ
];
46
char
mode
[8];
47
char
uid
[8];
48
char
gid
[8];
49
char
size
[12];
50
char
mtime
[12];
51
char
chksum
[8];
52
char
linkflag
;
53
char
linkname
[
NAMSIZ
];
54
}
dbuf
;
55
};
56
57
#define STOREDATA '\0'
58
#define LINK '1'
59
#define SYMLINK '2'
60
#define STORESTATUS '3'
61
#define REMOVE '4'
62
#define RENAME '5'
63
#define MKDIR '6'
64
#define RMDIR '7'
TBLOCK
#define TBLOCK
Definition:
coda_replay.h:38
NAMSIZ
#define NAMSIZ
Definition:
coda_replay.h:40
hblock::header
Definition:
coda_replay.h:44
hblock::header::gid
char gid[8]
Definition:
coda_replay.h:48
hblock::header::uid
char uid[8]
Definition:
coda_replay.h:47
hblock::header::name
char name[NAMSIZ]
Definition:
coda_replay.h:45
hblock::header::mode
char mode[8]
Definition:
coda_replay.h:46
hblock::header::linkname
char linkname[NAMSIZ]
Definition:
coda_replay.h:53
hblock::header::mtime
char mtime[12]
Definition:
coda_replay.h:50
hblock::header::size
char size[12]
Definition:
coda_replay.h:49
hblock::header::chksum
char chksum[8]
Definition:
coda_replay.h:51
hblock::header::linkflag
char linkflag
Definition:
coda_replay.h:52
hblock
Definition:
coda_replay.h:42
hblock::dummy
char dummy[TBLOCK]
Definition:
coda_replay.h:43
hblock::dbuf
struct hblock::header dbuf
Generated by
1.9.4