Lines Matching refs:dbname

3116 	char *dbname = NULL;  in apprentice_map()  local
3127 dbname = mkdbname(ms, fn, 0); in apprentice_map()
3128 if (dbname == NULL) in apprentice_map()
3131 if ((fd = open(dbname, O_RDONLY|O_BINARY)) == -1) in apprentice_map()
3135 file_error(ms, errno, "cannot stat `%s'", dbname); in apprentice_map()
3139 file_error(ms, 0, "file `%s' is too %s", dbname, in apprentice_map()
3149 file_error(ms, errno, "cannot map `%s'", dbname); in apprentice_map()
3166 if (check_buffer(ms, map, dbname) != 0) { in apprentice_map()
3171 file_error(ms, errno, "cannot mprotect `%s'", dbname); in apprentice_map()
3176 free(dbname); in apprentice_map()
3183 free(dbname); in apprentice_map()
3188 check_buffer(struct magic_set *ms, struct magic_map *map, const char *dbname) in check_buffer() argument
3198 file_error(ms, 0, "bad magic in `%s'", dbname); in check_buffer()
3211 VERSIONNO, dbname, version); in check_buffer()
3218 dbname, map->len, sizeof(struct magic)); in check_buffer()
3234 dbname, entries, nentries + 1); in check_buffer()
3253 char *dbname; in apprentice_compile() local
3261 dbname = mkdbname(ms, fn, 1); in apprentice_compile()
3263 if (dbname == NULL) in apprentice_compile()
3266 if ((fd = open(dbname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644)) == -1) in apprentice_compile()
3268 file_error(ms, errno, "cannot open `%s'", dbname); in apprentice_compile()
3277 file_error(ms, errno, "error writing `%s'", dbname); in apprentice_compile()
3284 file_error(ms, errno, "error writing `%s'", dbname); in apprentice_compile()
3295 free(dbname); in apprentice_compile()