Lines Matching refs:DIR
41 char* dir = strdup(directory);
44 char* d = dir + 1;
55 if (stat(dir, &st) == 0) {
61 if (mkdir(dir, 0770)) {
63 "Unable to create incident report dir %s: %s", dir,
68 if (chmod(dir, 0770)) {
70 "Unable to set permissions for incident report dir %s: %s", dir,
75 if (chown(dir, AID_SYSTEM, AID_SYSTEM)) {
76 ALOGE("No incident reports today. Unable to change ownership of dir %s: %s\n",
77 dir, strerror(errno));
108 free(dir);
121 DIR* dir;
127 if ((dir = opendir(directory)) == NULL) {
138 while ((entry = readdir(dir)) != NULL) {
156 closedir(dir);