devfs_devs.c (104113) | devfs_devs.c (107698) |
---|---|
1#define DEBUG 1 2/* 3 * Copyright (c) 2000 4 * Poul-Henning Kamp. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vfsops.c 1.36 28 * | 1#define DEBUG 1 2/* 3 * Copyright (c) 2000 4 * Poul-Henning Kamp. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vfsops.c 1.36 28 * |
29 * $FreeBSD: head/sys/fs/devfs/devfs_devs.c 104113 2002-09-28 21:21:01Z phk $ | 29 * $FreeBSD: head/sys/fs/devfs/devfs_devs.c 107698 2002-12-09 03:44:28Z rwatson $ |
30 */ 31 32#include "opt_devfs.h" 33#include "opt_mac.h" 34#ifndef NODEVFS 35 36#include <sys/param.h> 37#include <sys/systm.h> --- 291 unchanged lines hidden (view full) --- 329 for (q = s; *q != '/' && *q != '\0'; q++) 330 continue; 331 if (*q != '/') 332 break; 333 de = devfs_find(dd, s, q - s); 334 if (de == NULL) { 335 de = devfs_vmkdir(s, q - s, dd); 336#ifdef MAC | 30 */ 31 32#include "opt_devfs.h" 33#include "opt_mac.h" 34#ifndef NODEVFS 35 36#include <sys/param.h> 37#include <sys/systm.h> --- 291 unchanged lines hidden (view full) --- 329 for (q = s; *q != '/' && *q != '\0'; q++) 330 continue; 331 if (*q != '/') 332 break; 333 de = devfs_find(dd, s, q - s); 334 if (de == NULL) { 335 de = devfs_vmkdir(s, q - s, dd); 336#ifdef MAC |
337 mac_create_devfs_directory(s, q - s, 338 de); | 337 mac_create_devfs_directory( 338 dm->dm_mount, s, q - s, de); |
339#endif 340 de->de_inode = dm->dm_inode++; 341 TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list); 342 dd->de_links++; 343 } 344 s = q + 1; 345 dd = de; 346 } --- 11 unchanged lines hidden (view full) --- 358 } else { 359 de->de_inode = i; 360 de->de_uid = dev->si_uid; 361 de->de_gid = dev->si_gid; 362 de->de_mode = dev->si_mode; 363 de->de_dirent->d_type = DT_CHR; 364 } 365#ifdef MAC | 339#endif 340 de->de_inode = dm->dm_inode++; 341 TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list); 342 dd->de_links++; 343 } 344 s = q + 1; 345 dd = de; 346 } --- 11 unchanged lines hidden (view full) --- 358 } else { 359 de->de_inode = i; 360 de->de_uid = dev->si_uid; 361 de->de_gid = dev->si_gid; 362 de->de_mode = dev->si_mode; 363 de->de_dirent->d_type = DT_CHR; 364 } 365#ifdef MAC |
366 mac_create_devfs_device(dev, de); | 366 mac_create_devfs_device(dm->dm_mount, dev, de); |
367#endif 368 *dep = de; 369 de->de_dir = dd; 370 devfs_rules_apply(dm, de); 371 TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list); 372#if 0 373 printf("Add ino%d %s\n", i, dev->si_name); 374#endif --- 85 unchanged lines hidden --- | 367#endif 368 *dep = de; 369 de->de_dir = dd; 370 devfs_rules_apply(dm, de); 371 TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list); 372#if 0 373 printf("Add ino%d %s\n", i, dev->si_name); 374#endif --- 85 unchanged lines hidden --- |