bad_mkdir - { int rv; rv = mkdir(". .", 0775);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * mkdir */ #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <err.h> #include "config.h" #include "test.h" static void mkdir_dot(void) { int rv; rv = mkdir(".", 0775); report_test(rv, errno, EEXIST, "mkdir ."); } static void mkdir_dotdot(void)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { int rv; rv = mkdir(". .", 0775); report_test(rv, errno, EEXIST, "mkdir . ."); } static void mkdir_empty(void) { int rv; rv = mkdir("", 0775); report_test(rv, errno, EINVAL, "mkdir of empty string"); } void test_mkdir(void) { test_mkdir_path(); mkdir_dot(); mkdir_dotdot(); mkdir_empty(); }...
View Full Document

This note was uploaded on 11/10/2009 for the course CS 536 taught by Professor Lums during the Spring '09 term at Indiana.

Ask a homework question - tutors are online