Coda Distributed File System
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
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed 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
42union hblock {
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];
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'
#define TBLOCK
Definition: coda_replay.h:38
#define NAMSIZ
Definition: coda_replay.h:40
Definition: coda_replay.h:44
char gid[8]
Definition: coda_replay.h:48
char uid[8]
Definition: coda_replay.h:47
char name[NAMSIZ]
Definition: coda_replay.h:45
char mode[8]
Definition: coda_replay.h:46
char linkname[NAMSIZ]
Definition: coda_replay.h:53
char mtime[12]
Definition: coda_replay.h:50
char size[12]
Definition: coda_replay.h:49
char chksum[8]
Definition: coda_replay.h:51
char linkflag
Definition: coda_replay.h:52
Definition: coda_replay.h:42
char dummy[TBLOCK]
Definition: coda_replay.h:43
struct hblock::header dbuf