Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Michael Tokarev
29.04.2014 13:11, Paolo Bonzini wrote: > Il 29/04/2014 10:42, Michael Tokarev ha scritto: >> >>> > Also replace single instance pstrcpy() in vcard_emul_nss.c >> >>> > to strncpy(). This reverts commit 2e679780ae86c6ca8. >> An alternative would be to use g_strlcpy which guarantees

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Michael Tokarev
29.04.2014 13:11, Paolo Bonzini пишет: > Il 29/04/2014 10:42, Michael Tokarev ha scritto: >> >>> > Also replace single instance pstrcpy() in vcard_emul_nss.c >> >>> > to strncpy(). This reverts commit 2e679780ae86c6ca8. >> An alternative would be to use g_strlcpy which guarantees

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 10:42, Michael Tokarev ha scritto: >>> > Also replace single instance pstrcpy() in vcard_emul_nss.c >>> > to strncpy(). This reverts commit 2e679780ae86c6ca8. >> An alternative would be to use g_strlcpy which guarantees >> nul-termination. > > Yes, that is better. Actually in th

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Michael Tokarev
29.04.2014 12:38, Paolo Bonzini wrote: > Il 29/04/2014 10:26, Christophe Fergeau ha scritto: >>> > Replace QemuMutex with GMutex and QemuCond with GCond >>> > (with corresponding function changes), to make libcacard >>> > independent of qemu internal functions. >>> > >>> > Also replace single insta

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 10:26, Christophe Fergeau ha scritto: > Replace QemuMutex with GMutex and QemuCond with GCond > (with corresponding function changes), to make libcacard > independent of qemu internal functions. > > Also replace single instance pstrcpy() in vcard_emul_nss.c > to strncpy(). This rev

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Christophe Fergeau
Hey, patch looks good On Tue, Apr 29, 2014 at 10:02:27AM +0400, Michael Tokarev wrote: > Replace QemuMutex with GMutex and QemuCond with GCond > (with corresponding function changes), to make libcacard > independent of qemu internal functions. > > Also replace single instance pstrcpy() in vcard_e

[Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-28 Thread Michael Tokarev
Replace QemuMutex with GMutex and QemuCond with GCond (with corresponding function changes), to make libcacard independent of qemu internal functions. Also replace single instance pstrcpy() in vcard_emul_nss.c to strncpy(). This reverts commit 2e679780ae86c6ca8. After this step, none of libcacar