Lines Matching refs:new_name
707 static int rename_auxiliary_file(const char *path, const char *new_name, const char *suffix) { in rename_auxiliary_file() argument
711 fn = strjoina(new_name, suffix); in rename_auxiliary_file()
720 int image_rename(Image *i, const char *new_name) { in image_rename() argument
729 if (!image_name_is_valid(new_name)) in image_rename()
751 r = image_name_lock(new_name, LOCK_EX|LOCK_NB, &name_lock); in image_rename()
755 r = image_find(IMAGE_MACHINE, new_name, NULL, NULL); in image_rename()
772 new_path = file_in_same_dir(i->path, new_name); in image_rename()
781 new_path = file_in_same_dir(i->path, new_name); in image_rename()
787 fn = strjoina(new_name, ".raw"); in image_rename()
799 nn = strdup(new_name); in image_rename()
815 r = rename_auxiliary_file(*j, new_name, ".nspawn"); in image_rename()
820 r = rename_auxiliary_file(roothash, new_name, ".roothash"); in image_rename()
827 static int clone_auxiliary_file(const char *path, const char *new_name, const char *suffix) { in clone_auxiliary_file() argument
831 fn = strjoina(new_name, suffix); in clone_auxiliary_file()
840 int image_clone(Image *i, const char *new_name, bool read_only) { in image_clone() argument
849 if (!image_name_is_valid(new_name)) in image_clone()
863 r = image_name_lock(new_name, LOCK_EX|LOCK_NB, &name_lock); in image_clone()
867 r = image_find(IMAGE_MACHINE, new_name, NULL, NULL); in image_clone()
880 new_path = strjoina("/var/lib/machines/", new_name); in image_clone()
896 new_path = strjoina("/var/lib/machines/", new_name, ".raw"); in image_clone()
910 r = clone_auxiliary_file(*j, new_name, ".nspawn"); in image_clone()
915 r = clone_auxiliary_file(roothash, new_name, ".roothash"); in image_clone()