[PATCH 1/6] libusbg: Add remove binding functionality.

2014-03-10 Thread Krzysztof Opasiak
Add function which allow to remove binding between function and configuration. This functions also remove binding from internal library structures wht means that after this operation all pointers to removed binding are invalid. Signed-off-by: Krzysztof Opasiak k.opas...@samsung.com ---

Re: [PATCH 1/6] libusbg: Add remove binding functionality.

2014-03-10 Thread Robert Baldyga
Hi, diff --git a/src/usbg.c b/src/usbg.c index f655675..e82658c 100644 --- a/src/usbg.c +++ b/src/usbg.c @@ -142,6 +142,7 @@ static int usbg_translate_error(int error) break; case EACCES: case EROFS: + case EPERM: ret = USBG_ERROR_NO_ACCESS;

RE: [PATCH 1/6] libusbg: Add remove binding functionality.

2014-03-10 Thread Krzysztof Opasiak
Szyprowski Subject: Re: [PATCH 1/6] libusbg: Add remove binding functionality. Hi, diff --git a/src/usbg.c b/src/usbg.c index f655675..e82658c 100644 --- a/src/usbg.c +++ b/src/usbg.c @@ -142,6 +142,7 @@ static int usbg_translate_error(int error) break; case EACCES

Re: [PATCH 1/6] libusbg: Add remove binding functionality.

2014-03-10 Thread Robert Baldyga
; Stanislaw Wadas; ty317@samsung.org; Marek Szyprowski Subject: Re: [PATCH 1/6] libusbg: Add remove binding functionality. Hi, diff --git a/src/usbg.c b/src/usbg.c index f655675..e82658c 100644 --- a/src/usbg.c +++ b/src/usbg.c @@ -142,6 +142,7 @@ static int usbg_translate_error(int error

Re: [PATCH 1/6] libusbg: Add remove binding functionality.

2014-03-10 Thread Karol Lewandowski
On 03/10/2014 11:28 AM, Krzysztof Opasiak wrote: From: Robert Baldyga [mailto:r.bald...@samsung.com] +static int usbg_remove_file(char *path, char *name) +{ + int ret; + char buf[USBG_MAX_PATH_LENGTH]; + + sprintf(buf, %s/%s, path, name); Maybe snprintf would be better? There is