dirs.c (26722) | dirs.c (29574) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * |
38 * $Id$ | 38 * $Id: dirs.c,v 1.9 1997/06/18 06:28:46 charnier Exp $ |
39 */ 40 41#ifndef lint 42static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95"; 43#endif /* not lint */ 44 45#include <sys/param.h> 46#include <sys/file.h> --- 250 unchanged lines hidden (view full) --- 297 char *path, *name, buffer[MAXPATHLEN]; 298 299 strcpy(buffer, pathname); 300 path = buffer; 301 ino = ROOTINO; 302 while (*path == '/') 303 path++; 304 dp = NULL; | 39 */ 40 41#ifndef lint 42static char sccsid[] = "@(#)dirs.c 8.7 (Berkeley) 5/1/95"; 43#endif /* not lint */ 44 45#include <sys/param.h> 46#include <sys/file.h> --- 250 unchanged lines hidden (view full) --- 297 char *path, *name, buffer[MAXPATHLEN]; 298 299 strcpy(buffer, pathname); 300 path = buffer; 301 ino = ROOTINO; 302 while (*path == '/') 303 path++; 304 dp = NULL; |
305 while ((name = strsep(&path, "/")) != NULL && *name != NULL) { | 305 while ((name = strsep(&path, "/")) != NULL && *name != '\0') { |
306 if ((dp = searchdir(ino, name)) == NULL) 307 return (NULL); 308 ino = dp->d_ino; 309 } 310 return (dp); 311} 312 313/* --- 457 unchanged lines hidden --- | 306 if ((dp = searchdir(ino, name)) == NULL) 307 return (NULL); 308 ino = dp->d_ino; 309 } 310 return (dp); 311} 312 313/* --- 457 unchanged lines hidden --- |