diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 15:04:38 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:32 +0000 |
commit | b48b7b4109868a8c0ddda090992e936e821c7ea6 (patch) | |
tree | 696be8ea782f2548c0f63bb0188f4c8d3eeed681 /import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch | |
parent | d849ec78de728ef9a2d383b92ccfeabf40f8f1d0 (diff) | |
download | talos-openbmc-b48b7b4109868a8c0ddda090992e936e821c7ea6.tar.gz talos-openbmc-b48b7b4109868a8c0ddda090992e936e821c7ea6.zip |
Squashed 'import-layers/meta-openembedded/' content from commit 247b126
Change-Id: I40827e9ce5fba63f1cca2a0be44976ae8383b4c0
git-subtree-dir: import-layers/meta-openembedded
git-subtree-split: 247b1267bbe95719cd4877d2d3cfbaf2a2f4865a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch')
-rw-r--r-- | import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch new file mode 100644 index 000000000..452aa05f8 --- /dev/null +++ b/import-layers/meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch @@ -0,0 +1,39 @@ +[PATCH] fix the empty file writting + +Upstream-Status: pending + +With the feature that checking the disk filled up, the return +value of function write_behind was checked and used to detect +the disk status. While for empty file, without data being +written, this function will return -1 thus the disk filled up +error was miss-raised. + +make write_behind to return 0 if written file is empty, to fix +the this bug. + +Signed-off-by: Roy.Li <rongqing.li@windriver.com> +--- + common/tftpsubs.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/common/tftpsubs.c b/common/tftpsubs.c +index b4ea3f2..9f6cafc 100644 +--- a/common/tftpsubs.c ++++ b/common/tftpsubs.c +@@ -198,9 +198,12 @@ int write_behind(FILE * file, int convert) + nextone = !nextone; /* incr for next time */ + buf = dp->th_data; + +- if (count <= 0) ++ if (count < 0) + return -1; /* nak logic? */ + ++ if (count == 0) ++ return 0; ++ + if (convert == 0) + return write(fileno(file), buf, count); + +-- +1.9.1 + |