diff options
-rw-r--r-- | src/function/ms.c | 4 | ||||
-rw-r--r-- | src/usbg.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/function/ms.c b/src/function/ms.c index 9ec1828..352113b 100644 --- a/src/function/ms.c +++ b/src/function/ms.c @@ -545,7 +545,7 @@ int usbg_f_ms_create_lun(usbg_f_ms *mf, int lun_id, return 0; remove_lun: - unlink(lpath); + rmdir(lpath); return ret; } @@ -567,7 +567,7 @@ int usbg_f_ms_rm_lun(usbg_f_ms *mf, int lun_id) if (ret >= sizeof(lpath)) return USBG_ERROR_PATH_TOO_LONG; - ret = unlink(lpath); + ret = rmdir(lpath); if (ret) return usbg_translate_error(errno); @@ -1313,7 +1313,7 @@ static int usbg_create_empty_gadget(usbg_state *s, const char *name, return 0; rm_gdir: - unlink(gpath); + rmdir(gpath); free_gadget: usbg_free_gadget(*g); *g = NULL; @@ -1905,7 +1905,7 @@ int usbg_create_config(usbg_gadget *g, int id, const char *label, return 0; rm_config: - unlink(cpath); + rmdir(cpath); free_config: usbg_free_config(conf); out: |