Lines Matching refs:dbname

3033 	char *dbname = NULL;  in apprentice_map()  local
3044 dbname = mkdbname(ms, fn, 0); in apprentice_map()
3045 if (dbname == NULL) in apprentice_map()
3048 if ((fd = open(dbname, O_RDONLY|O_BINARY)) == -1) in apprentice_map()
3052 file_error(ms, errno, "cannot stat `%s'", dbname); in apprentice_map()
3056 file_error(ms, 0, "file `%s' is too %s", dbname, in apprentice_map()
3066 file_error(ms, errno, "cannot map `%s'", dbname); in apprentice_map()
3084 if (check_buffer(ms, map, dbname) != 0) { in apprentice_map()
3090 file_error(ms, errno, "cannot mprotect `%s'", dbname); in apprentice_map()
3095 free(dbname); in apprentice_map()
3102 free(dbname); in apprentice_map()
3107 check_buffer(struct magic_set *ms, struct magic_map *map, const char *dbname) in check_buffer() argument
3117 file_error(ms, 0, "bad magic in `%s'", dbname); in check_buffer()
3130 VERSIONNO, dbname, version); in check_buffer()
3137 dbname, map->len, sizeof(struct magic)); in check_buffer()
3153 dbname, entries, nentries + 1); in check_buffer()
3172 char *dbname; in apprentice_compile() local
3180 dbname = mkdbname(ms, fn, 1); in apprentice_compile()
3182 if (dbname == NULL) in apprentice_compile()
3185 if ((fd = open(dbname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644)) == -1) in apprentice_compile()
3187 file_error(ms, errno, "cannot open `%s'", dbname); in apprentice_compile()
3196 file_error(ms, errno, "error writing `%s'", dbname); in apprentice_compile()
3203 file_error(ms, errno, "error writing `%s'", dbname); in apprentice_compile()
3214 free(dbname); in apprentice_compile()