mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 09:57:26 +03:00
Avoid new "make syntax-check" failures.
* .x-sc_avoid_write: Exempt src/util-lib.c, too. * Makefile.maint (sc_unmarked_diagnostics): Filter out false positives. * src/storage_backend_fs.c (virStorageBackendFileSystemVolCreate): Use safewrite, not write. * src/storage_backend_logical.c (virStorageBackendLogicalBuildPool): Likewise.
This commit is contained in:
parent
b1b23f76be
commit
e497deb89e
@ -1,2 +1,3 @@
|
|||||||
^src/util\.c$
|
^src/util\.c$
|
||||||
^src/xend_internal\.c$
|
^src/xend_internal\.c$
|
||||||
|
^src/util-lib\.c$
|
||||||
|
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Mon Feb 25 10:59:43 CET 2008 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
|
Avoid new "make syntax-check" failures.
|
||||||
|
* .x-sc_avoid_write: Exempt src/util-lib.c, too.
|
||||||
|
* Makefile.maint (sc_unmarked_diagnostics): Filter out false positives.
|
||||||
|
* src/storage_backend_fs.c (virStorageBackendFileSystemVolCreate):
|
||||||
|
Use safewrite, not write.
|
||||||
|
* src/storage_backend_logical.c (virStorageBackendLogicalBuildPool):
|
||||||
|
Likewise.
|
||||||
|
|
||||||
Fri Feb 22 13:32:11 CET 2008 Jim Meyering <meyering@redhat.com>
|
Fri Feb 22 13:32:11 CET 2008 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
avoid format string warnings
|
avoid format string warnings
|
||||||
|
@ -304,6 +304,9 @@ err_func_re = \
|
|||||||
|
|
||||||
# Look for diagnostics that aren't marked for translation.
|
# Look for diagnostics that aren't marked for translation.
|
||||||
# This won't find any for which error's format string is on a separate line.
|
# This won't find any for which error's format string is on a separate line.
|
||||||
|
# The sed filters eliminate false-positives like these:
|
||||||
|
# _("...: "
|
||||||
|
# "%s", _("no storage vol w..."
|
||||||
sc_unmarked_diagnostics:
|
sc_unmarked_diagnostics:
|
||||||
@grep -nE \
|
@grep -nE \
|
||||||
'\<(vshError|error) \([^"]*"[^"]*[a-z]{3}' $$($(CVS_LIST_EXCEPT)) \
|
'\<(vshError|error) \([^"]*"[^"]*[a-z]{3}' $$($(CVS_LIST_EXCEPT)) \
|
||||||
@ -312,7 +315,8 @@ sc_unmarked_diagnostics:
|
|||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
@{ grep -nE '\<$(err_func_re) *\(.*;$$' $$($(CVS_LIST_EXCEPT)); \
|
@{ grep -nE '\<$(err_func_re) *\(.*;$$' $$($(CVS_LIST_EXCEPT)); \
|
||||||
grep -A1 -nE '\<$(err_func_re) *\(.*,$$' $$($(CVS_LIST_EXCEPT)); } \
|
grep -A1 -nE '\<$(err_func_re) *\(.*,$$' $$($(CVS_LIST_EXCEPT)); } \
|
||||||
| grep '[ ]"' && \
|
| sed 's/_("[^"][^"]*"//;s/[ ]"%s"//' \
|
||||||
|
| grep '[ ]"' && \
|
||||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
|
|
||||||
|
@ -854,7 +854,7 @@ virStorageBackendFileSystemVolCreate(virConnectPtr conn,
|
|||||||
int bytes = sizeof(zeros);
|
int bytes = sizeof(zeros);
|
||||||
if (bytes > remain)
|
if (bytes > remain)
|
||||||
bytes = remain;
|
bytes = remain;
|
||||||
if ((bytes = write(fd, zeros, bytes)) < 0) {
|
if ((bytes = safewrite(fd, zeros, bytes)) < 0) {
|
||||||
virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||||
_("cannot fill file '%s': %s"),
|
_("cannot fill file '%s': %s"),
|
||||||
vol->target.path, strerror(errno));
|
vol->target.path, strerror(errno));
|
||||||
|
@ -287,7 +287,7 @@ virStorageBackendLogicalBuildPool(virConnectPtr conn,
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (write(fd, zeros, sizeof(zeros)) != sizeof(zeros)) {
|
if (safewrite(fd, zeros, sizeof(zeros)) < 0) {
|
||||||
virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||||
_("cannot clear device header %s"),
|
_("cannot clear device header %s"),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user