This is better, how about:
if (!ovs_scan(s, "%16"SCNx64"%16"SCNx64, &ufid->u64.hi, &ufid->u64.lo) ...
On Thu, Dec 18, 2014 at 10:40 AM, Joe Stringer wrote:
> You mean "%16"SCNx64? That's much tidier:-)
>
> Full diff against master is:
>
> diff --git a/lib/odp-util.c b/lib/odp-util.c
> index
You mean "%16"SCNx64? That's much tidier:-)
Full diff against master is:
diff --git a/lib/odp-util.c b/lib/odp-util.c
index 1dc63ef..b1940c7 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -2017,12 +2017,12 @@ odp_ufid_from_string(const char *s_, ovs_u128 *ufid)
return -EINVAL;
Would it be simpler to do "16%"SCNx64 ?
On Wed, Dec 17, 2014 at 10:34 AM, Joe Stringer wrote:
> Commit 534a19b (dpctl: Add support for using UFID to add/del flows.)
> introduced string parsing functions for UFIDs, but provided a broken
> implementation where the upper 64 bits would be ignored, th
Commit 534a19b (dpctl: Add support for using UFID to add/del flows.)
introduced string parsing functions for UFIDs, but provided a broken
implementation where the upper 64 bits would be ignored, then the lower
64 bits would be read into both the lower and upper UFID positions. Fix
the implementatio