vsta

Check-in [270aa604dc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make namer name and disk block device name available via stat().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:270aa604dc73d383713dd5b4398c52c37799859d72a5eb416972bd93fef6dd49
User & Date: vandys 2001-12-19 21:41:32
Context
2001-12-19
22:10
Fix error message (duh) check-in: 2998b01bb1 user: vandys tags: master, trunk
21:41
Make namer name and disk block device name available via stat(). check-in: 270aa604dc user: vandys tags: master, trunk
13:26
Add dirname(1) check-in: 879326aa9d user: vandys tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to vsta/src/srv/dos/dos.h.

285
286
287
288
289
290
291

292
293
 */
extern int blkdev;
extern struct boot bootb;
extern uint dirents;
extern struct node *rootdir;
extern ulong data0;
extern claddr_t root_cluster;


#endif /* _DOS_H */







>


285
286
287
288
289
290
291
292
293
294
 */
extern int blkdev;
extern struct boot bootb;
extern uint dirents;
extern struct node *rootdir;
extern ulong data0;
extern claddr_t root_cluster;
extern char *namer_name, *blk_name;

#endif /* _DOS_H */

Changes to vsta/src/srv/dos/main.c.

19
20
21
22
23
24
25

26
27
28
29
30
31
32
...
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
int blkdev;			/* Device this FS is mounted upon */
port_t rootport;		/* Port we receive contacts through */
char *secbuf;			/* A sector buffer */
struct boot bootb;		/* Image of boot sector */
static struct hash *filehash;	/* Handle->filehandle mapping */
int ncache = NCACHE;		/* # sectors we hold in block cache */
int rofs;			/* Read-only filesystem? */


extern port_t path_open(char *, int);

/*
 * Protection for all DOSFS files: everybody can read, only
 * group 1.2 (sys.sys) can write and chmod.
 */
................................................................................
 */
int
main(int argc, char *argv[])
{
	port_t port;
	port_name fsname;
	int x, retries, nuser;
	char *namer_name = 0, *blk_name = 0;

	/*
	 * Initialize syslog
	 */
	openlog("dos", LOG_PID, LOG_DAEMON);

	/*







>







 







<







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
388
389
390
391
392
393
394

395
396
397
398
399
400
401
int blkdev;			/* Device this FS is mounted upon */
port_t rootport;		/* Port we receive contacts through */
char *secbuf;			/* A sector buffer */
struct boot bootb;		/* Image of boot sector */
static struct hash *filehash;	/* Handle->filehandle mapping */
int ncache = NCACHE;		/* # sectors we hold in block cache */
int rofs;			/* Read-only filesystem? */
char *namer_name, *blk_name;	/* Our name, name of block device */

extern port_t path_open(char *, int);

/*
 * Protection for all DOSFS files: everybody can read, only
 * group 1.2 (sys.sys) can write and chmod.
 */
................................................................................
 */
int
main(int argc, char *argv[])
{
	port_t port;
	port_name fsname;
	int x, retries, nuser;


	/*
	 * Initialize syslog
	 */
	openlog("dos", LOG_PID, LOG_DAEMON);

	/*

Changes to vsta/src/srv/dos/stat.c.

174
175
176
177
178
179
180
181

182
183
184
185
186
187
188
189
	 * No dir entry for root, otherwise get a copy of it
	 */
	bzero(&d, sizeof(d));
	if (n != procroot) {
		(void)dir_copy(n->n_dir, n->n_slot, &d);
		p = result;
	} else {
		sprintf(result, "clsize=%d\ndata0=%lu\n",

			CLSIZE, data0);
		p = result + strlen(result);
	}
	sprintf(p,
"perm=1/1\nacc=%s\ntype=%c\nsize=%lu\nowner=0\ninode=%lu\n"
"mtime=%lu\nshortname=%s\nstart=%u\n",
		dos_acc(&d),
		(isdir ? 'd' : 'f'),







|
>
|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
	 * No dir entry for root, otherwise get a copy of it
	 */
	bzero(&d, sizeof(d));
	if (n != procroot) {
		(void)dir_copy(n->n_dir, n->n_slot, &d);
		p = result;
	} else {
		sprintf(result, "clsize=%d\ndata0=%lu\n"
		 "name=%s\nblkdev=%s\n",
			CLSIZE, data0, namer_name, blk_name);
		p = result + strlen(result);
	}
	sprintf(p,
"perm=1/1\nacc=%s\ntype=%c\nsize=%lu\nowner=0\ninode=%lu\n"
"mtime=%lu\nshortname=%s\nstart=%u\n",
		dos_acc(&d),
		(isdir ? 'd' : 'f'),