ufs.c (6d423eb2cb9bc2fd1aa22d71511775eb7acb8fa5) | ufs.c (fb14e73cb4062d7272ce6183d748adedd868906b) |
---|---|
1/* $NetBSD: ufs.c,v 1.20 1998/03/01 07:15:39 ross Exp $ */ 2 3/*- 4 * Copyright (c) 2002 Networks Associates Technology, Inc. 5 * All rights reserved. 6 * 7 * This software was developed for the FreeBSD Project by Marshall 8 * Kirk McKusick and Network Associates Laboratories, the Security --- 126 unchanged lines hidden (view full) --- 135static int buf_read_file(struct open_file *, char **, size_t *); 136static int buf_write_file(struct open_file *, const char *, size_t *); 137static int search_directory(char *, struct open_file *, ino_t *); 138static int ufs_use_sa_read(void *, off_t, void **, int); 139 140/* from ffs_subr.c */ 141int ffs_sbget(void *, struct fs **, off_t, char *, 142 int (*)(void *, off_t, void **, int)); | 1/* $NetBSD: ufs.c,v 1.20 1998/03/01 07:15:39 ross Exp $ */ 2 3/*- 4 * Copyright (c) 2002 Networks Associates Technology, Inc. 5 * All rights reserved. 6 * 7 * This software was developed for the FreeBSD Project by Marshall 8 * Kirk McKusick and Network Associates Laboratories, the Security --- 126 unchanged lines hidden (view full) --- 135static int buf_read_file(struct open_file *, char **, size_t *); 136static int buf_write_file(struct open_file *, const char *, size_t *); 137static int search_directory(char *, struct open_file *, ino_t *); 138static int ufs_use_sa_read(void *, off_t, void **, int); 139 140/* from ffs_subr.c */ 141int ffs_sbget(void *, struct fs **, off_t, char *, 142 int (*)(void *, off_t, void **, int)); |
143/* 144 * Request standard superblock location in ffs_sbget 145 */ 146#define STDSB -1 /* Fail if check-hash is bad */ 147#define STDSB_NOHASHFAIL -2 /* Ignore check-hash failure */ |
|
143 144/* 145 * Read a new inode into a file structure. 146 */ 147static int 148read_inode(inumber, f) 149 ino_t inumber; 150 struct open_file *f; --- 363 unchanged lines hidden (view full) --- 514 515 /* allocate file system specific data structure */ 516 fp = malloc(sizeof(struct file)); 517 bzero(fp, sizeof(struct file)); 518 f->f_fsdata = (void *)fp; 519 520 /* read super block */ 521 twiddle(1); | 148 149/* 150 * Read a new inode into a file structure. 151 */ 152static int 153read_inode(inumber, f) 154 ino_t inumber; 155 struct open_file *f; --- 363 unchanged lines hidden (view full) --- 519 520 /* allocate file system specific data structure */ 521 fp = malloc(sizeof(struct file)); 522 bzero(fp, sizeof(struct file)); 523 f->f_fsdata = (void *)fp; 524 525 /* read super block */ 526 twiddle(1); |
522 if ((rc = ffs_sbget(f, &fs, -1, "stand", ufs_use_sa_read)) != 0) | 527 if ((rc = ffs_sbget(f, &fs, STDSB_NOHASHFAIL, "stand", 528 ufs_use_sa_read)) != 0) |
523 goto out; 524 fp->f_fs = fs; 525 /* 526 * Calculate indirect block levels. 527 */ 528 { 529 ufs2_daddr_t mult; 530 int level; --- 352 unchanged lines hidden --- | 529 goto out; 530 fp->f_fs = fs; 531 /* 532 * Calculate indirect block levels. 533 */ 534 { 535 ufs2_daddr_t mult; 536 int level; --- 352 unchanged lines hidden --- |