Use more manifest constants.

This commit is contained in:
bjh21 2006-04-06 20:41:38 +00:00
parent bfdee53d40
commit 5d0813e0c9
2 changed files with 19 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: riscoscalls.h,v 1.5 2006/04/01 19:08:08 bjh21 Exp $ */
/* $NetBSD: riscoscalls.h,v 1.6 2006/04/06 20:41:38 bjh21 Exp $ */
/*-
* Copyright (c) 2001 Ben Harris
@ -299,6 +299,18 @@ extern os_error *xosmodule_lookup(char const *, int *, int *, void **, void **,
#define fileswitch_NEEDS_CAT (1 << 1)
#define fileswitch_NEEDS_EX (1 << 2)
#define fileswitch_NOT_FOUND 0
#define fileswitch_IS_FILE 1
#define fileswitch_IS_DIR 2
#define fileswitch_IS_IMAGE 3
#define fileswitch_ATTR_OWNER_READ (1 << 0)
#define fileswitch_ATTR_OWNER_WRITE (1 << 1)
#define fileswitch_ATTR_OWNER_LOCKED (1 << 3)
#define fileswitch_ATTR_WORLD_READ (1 << 4)
#define fileswitch_ATTR_WORLD_WRITE (1 << 5)
#define fileswitch_ATTR_WORLD_LOCKED (1 << 7)
#ifndef __ASSEMBLER__
extern os_error *xosfscontrol_shutdown(void);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: nbfs.c,v 1.1 2006/04/05 21:33:26 bjh21 Exp $ */
/* $NetBSD: nbfs.c,v 1.2 2006/04/06 20:41:38 bjh21 Exp $ */
/*-
* Copyright (c) 2006 Ben Harris
@ -239,17 +239,11 @@ nbfs_file(struct nbfs_reg *r)
else {
err = FS_STAT(f.f_ops)(&f, &st);
if (err != 0) goto fail;
if (S_ISDIR(st.st_mode)) {
r->r0 = 2;
r->r2 = r->r3 = 0;
r->r4 = st.st_size;
r->r5 = 0x11;
} else {
r->r0 = 1;
r->r2 = r->r3 = 0;
r->r4 = st.st_size;
r->r5 = 0x11;
}
r->r0 = S_ISDIR(st.st_mode) ?
fileswitch_IS_DIR : fileswitch_IS_FILE;
r->r2 = r->r3 = 0;
r->r4 = st.st_size;
r->r5 = fileswitch_OWNER_READ | fileswitch_WORLD_READ;
}
break;
default: