Deleted Added
full compact
pass2.c (221110) pass2.c (229403)
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[] = "@(#)pass2.c 8.9 (Berkeley) 4/28/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[] = "@(#)pass2.c 8.9 (Berkeley) 4/28/95";
33#endif /* not lint */
34#endif
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/pass2.c 221110 2011-04-27 02:55:03Z des $");
36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/pass2.c 229403 2012-01-03 18:51:58Z ed $");
37
38#include <sys/param.h>
39#include <sys/sysctl.h>
40
41#include <ufs/ufs/dinode.h>
42#include <ufs/ufs/dir.h>
43#include <ufs/ffs/fs.h>
44

--- 563 unchanged lines hidden (view full) ---

608 * unlink(last component of oldname pathname);
609 */
610 cmd.value = inp->i_parent;
611 if (sysctlbyname("vfs.ffs.setcwd", 0, 0,
612 &cmd, sizeof cmd) == -1) {
613 printf(" (IGNORED)\n");
614 return (0);
615 }
37
38#include <sys/param.h>
39#include <sys/sysctl.h>
40
41#include <ufs/ufs/dinode.h>
42#include <ufs/ufs/dir.h>
43#include <ufs/ffs/fs.h>
44

--- 563 unchanged lines hidden (view full) ---

608 * unlink(last component of oldname pathname);
609 */
610 cmd.value = inp->i_parent;
611 if (sysctlbyname("vfs.ffs.setcwd", 0, 0,
612 &cmd, sizeof cmd) == -1) {
613 printf(" (IGNORED)\n");
614 return (0);
615 }
616 if ((cp = rindex(oldname, '/')) == NULL) {
616 if ((cp = strchr(oldname, '/')) == NULL) {
617 printf(" (IGNORED)\n");
618 return (0);
619 }
620 cmd.value = (intptr_t)(cp + 1);
621 cmd.size = inp->i_number; /* verify same name */
622 if (sysctlbyname("vfs.ffs.unlink", 0, 0,
623 &cmd, sizeof cmd) == -1) {
624 printf(" (UNLINK FAILED: %s)\n",

--- 42 unchanged lines hidden ---
617 printf(" (IGNORED)\n");
618 return (0);
619 }
620 cmd.value = (intptr_t)(cp + 1);
621 cmd.size = inp->i_number; /* verify same name */
622 if (sysctlbyname("vfs.ffs.unlink", 0, 0,
623 &cmd, sizeof cmd) == -1) {
624 printf(" (UNLINK FAILED: %s)\n",

--- 42 unchanged lines hidden ---