utilities.c (128073) | utilities.c (221110) |
---|---|
1/* 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 */ 29 30#if 0 31#ifndef lint 32static const char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95"; 33#endif /* not lint */ 34#endif 35#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 */ 29 30#if 0 31#ifndef lint 32static const char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95"; 33#endif /* not lint */ 34#endif 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/utilities.c 128073 2004-04-09 19:58:40Z markm $"); | 36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/utilities.c 221110 2011-04-27 02:55:03Z des $"); |
37 38#include <sys/param.h> 39#include <sys/types.h> 40#include <sys/stat.h> 41 42#include <ufs/ufs/dinode.h> 43#include <ufs/ufs/dir.h> 44#include <ufs/ffs/fs.h> --- 36 unchanged lines hidden (view full) --- 81 } 82 switch(stblock.st_mode & S_IFMT) { 83 case S_IFCHR: 84 case S_IFBLK: 85 return(newname); 86 case S_IFDIR: 87 if (retried) 88 break; | 37 38#include <sys/param.h> 39#include <sys/types.h> 40#include <sys/stat.h> 41 42#include <ufs/ufs/dinode.h> 43#include <ufs/ufs/dir.h> 44#include <ufs/ffs/fs.h> --- 36 unchanged lines hidden (view full) --- 81 } 82 switch(stblock.st_mode & S_IFMT) { 83 case S_IFCHR: 84 case S_IFBLK: 85 return(newname); 86 case S_IFDIR: 87 if (retried) 88 break; |
89 | 89 |
90 len = strlen(origname) - 1; 91 if (len > 0 && origname[len] == '/') 92 /* remove trailing slash */ 93 origname[len] = '\0'; 94 if ((fsinfo = getfsfile(origname)) == NULL) { 95 printf( 96 "Can't resolve %s to character special device.\n", 97 origname); --- 24 unchanged lines hidden --- | 90 len = strlen(origname) - 1; 91 if (len > 0 && origname[len] == '/') 92 /* remove trailing slash */ 93 origname[len] = '\0'; 94 if ((fsinfo = getfsfile(origname)) == NULL) { 95 printf( 96 "Can't resolve %s to character special device.\n", 97 origname); --- 24 unchanged lines hidden --- |