diff options
author | charnier <charnier@FreeBSD.org> | 1997-10-10 06:23:42 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-10-10 06:23:42 +0000 |
commit | c4198a70c7f56d54ec13a8e63e0f03bb8ad51d5d (patch) | |
tree | 1eecca23afdea0a229b2d419a8c65df14f1b1190 /usr.sbin/pw/cpdir.c | |
parent | 272f35378bb5e1abaf91ce93316ca11f0cdf70fc (diff) | |
download | FreeBSD-src-c4198a70c7f56d54ec13a8e63e0f03bb8ad51d5d.zip FreeBSD-src-c4198a70c7f56d54ec13a8e63e0f03bb8ad51d5d.tar.gz |
Use err(3) instead of local redefinition. Add rcsid string.
Diffstat (limited to 'usr.sbin/pw/cpdir.c')
-rw-r--r-- | usr.sbin/pw/cpdir.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/usr.sbin/pw/cpdir.c b/usr.sbin/pw/cpdir.c index 51891da..048a87b 100644 --- a/usr.sbin/pw/cpdir.c +++ b/usr.sbin/pw/cpdir.c @@ -22,20 +22,24 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id$ */ +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + +#include <err.h> +#include <errno.h> +#include <fcntl.h> #include <stdio.h> #include <string.h> #include <stdlib.h> -#include <fcntl.h> +#include <unistd.h> #include <sys/types.h> #include <sys/stat.h> -#include <dirent.h> -#include <unistd.h> #include <sys/param.h> -#include <errno.h> +#include <dirent.h> #include "pwupd.h" @@ -47,8 +51,7 @@ copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid char dst[MAXPATHLEN]; if (mkdir(dir, mode) != 0 && errno != EEXIST) { - sprintf(src, "mkdir(%s)", dir); - perror(src); + warn("mkdir(%s)", dir); } else { int infd, outfd; struct stat st; |