Lines Matching refs:dbname

3278 	char *dbname = NULL;  in apprentice_map()  local
3289 dbname = mkdbname(ms, fn, 0); in apprentice_map()
3290 if (dbname == NULL) in apprentice_map()
3293 if ((fd = open(dbname, O_RDONLY|O_BINARY)) == -1) in apprentice_map()
3297 file_error(ms, errno, "cannot stat `%s'", dbname); in apprentice_map()
3301 file_error(ms, 0, "file `%s' is too %s", dbname, in apprentice_map()
3311 file_error(ms, errno, "cannot map `%s'", dbname); in apprentice_map()
3328 if (check_buffer(ms, map, dbname) != 0) { in apprentice_map()
3333 file_error(ms, errno, "cannot mprotect `%s'", dbname); in apprentice_map()
3338 free(dbname); in apprentice_map()
3345 free(dbname); in apprentice_map()
3350 check_buffer(struct magic_set *ms, struct magic_map *map, const char *dbname) in check_buffer() argument
3360 file_error(ms, 0, "bad magic in `%s'", dbname); in check_buffer()
3373 VERSIONNO, dbname, version); in check_buffer()
3380 dbname, map->len, sizeof(struct magic)); in check_buffer()
3396 dbname, entries, nentries + 1); in check_buffer()
3415 char *dbname; in apprentice_compile() local
3423 dbname = mkdbname(ms, fn, 1); in apprentice_compile()
3425 if (dbname == NULL) in apprentice_compile()
3428 if ((fd = open(dbname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644)) == -1) in apprentice_compile()
3430 file_error(ms, errno, "cannot open `%s'", dbname); in apprentice_compile()
3439 file_error(ms, errno, "error writing `%s'", dbname); in apprentice_compile()
3446 file_error(ms, errno, "error writing `%s'", dbname); in apprentice_compile()
3457 free(dbname); in apprentice_compile()