2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

odp-util: Improve formatting of bogus empty action attributes.

Before this change, these were formatted as:
	,***%u leftover bytes***
After this change, they are formatted as:
	<empty>,***%u leftover bytes***

Reviewed by Ethan Jackson <ethan@nicira.com>.
This commit is contained in:
Ben Pfaff
2011-01-11 15:35:56 -08:00
parent 2ad204c863
commit 3476fce34e

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2010 Nicira Networks.
* Copyright (c) 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -187,6 +187,9 @@ format_odp_actions(struct ds *ds, const struct nlattr *actions,
format_odp_action(ds, a);
}
if (left) {
if (left == actions_len) {
ds_put_cstr(ds, "<empty>");
}
ds_put_format(ds, " ***%u leftover bytes***", left);
}
} else {