Deleted Added
full compact
futil.c (131285) futil.c (206043)
1/*
2 * FreeBSD install - a package for the installation and maintainance
3 * of non-core utilities.
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

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

14 * Jordan K. Hubbard
15 * 18 July 1993
16 *
17 * Miscellaneous file access utilities.
18 *
19 */
20
21#include <sys/cdefs.h>
1/*
2 * FreeBSD install - a package for the installation and maintainance
3 * of non-core utilities.
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

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

14 * Jordan K. Hubbard
15 * 18 July 1993
16 *
17 * Miscellaneous file access utilities.
18 *
19 */
20
21#include <sys/cdefs.h>
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/add/futil.c 131285 2004-06-29 19:06:42Z eik $");
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/add/futil.c 206043 2010-04-01 14:27:29Z flz $");
23
24#include <err.h>
25#include "lib.h"
26#include "add.h"
27
28/*
29 * Assuming dir is a desired directory name, make it and all intervening
30 * directories necessary.

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

45 if (fexists(dir)) {
46 if (!isdir(dir)) {
47 if (cp2)
48 *cp2 = '/';
49 return FAIL;
50 }
51 }
52 else {
23
24#include <err.h>
25#include "lib.h"
26#include "add.h"
27
28/*
29 * Assuming dir is a desired directory name, make it and all intervening
30 * directories necessary.

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

45 if (fexists(dir)) {
46 if (!isdir(dir)) {
47 if (cp2)
48 *cp2 = '/';
49 return FAIL;
50 }
51 }
52 else {
53 if (vsystem("/bin/mkdir %s", dir)) {
53 if (mkdir(dir, 0777) < 0) {
54 if (cp2)
55 *cp2 = '/';
56 return FAIL;
57 }
58 apply_perms(NULL, dir);
59 }
60 /* Put it back */
61 if (cp2) {

--- 36 unchanged lines hidden ---
54 if (cp2)
55 *cp2 = '/';
56 return FAIL;
57 }
58 apply_perms(NULL, dir);
59 }
60 /* Put it back */
61 if (cp2) {

--- 36 unchanged lines hidden ---