git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
For SNAT, don't store the pre-fragment L2 header before actions are applied.
[sliver-openvswitch.git]
/
lib
/
dynamic-string.c
diff --git
a/lib/dynamic-string.c
b/lib/dynamic-string.c
index
2c2effb
..
03efac0
100644
(file)
--- a/
lib/dynamic-string.c
+++ b/
lib/dynamic-string.c
@@
-178,6
+178,22
@@
ds_put_strftime(struct ds *ds, const char *template, const struct tm *tm)
}
}
}
}
+int
+ds_get_line(struct ds *ds, FILE *file)
+{
+ ds_clear(ds);
+ for (;;) {
+ int c = getc(file);
+ if (c == EOF) {
+ return ds->length ? 0 : EOF;
+ } else if (c == '\n') {
+ return 0;
+ } else {
+ ds_put_char(ds, c);
+ }
+ }
+}
+
char *
ds_cstr(struct ds *ds)
{
char *
ds_cstr(struct ds *ds)
{