Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4db6e7
)
Branch HEAD
author
adilger
<adilger>
Thu, 4 Sep 2008 08:39:28 +0000
(08:39 +0000)
committer
adilger
<adilger>
Thu, 4 Sep 2008 08:39:28 +0000
(08:39 +0000)
Wrap at 80 columns.
libcfs/libcfs/tracefile.c
patch
|
blob
|
history
diff --git
a/libcfs/libcfs/tracefile.c
b/libcfs/libcfs/tracefile.c
index
20df843
..
15f70de
100644
(file)
--- a/
libcfs/libcfs/tracefile.c
+++ b/
libcfs/libcfs/tracefile.c
@@
-238,7
+238,7
@@
static struct trace_page *trace_get_tage(struct trace_cpu_data *tcd,
int libcfs_debug_vmsg2(cfs_debug_limit_state_t *cdls, int subsys, int mask,
const char *file, const char *fn, const int line,
const char *format1, va_list args,
int libcfs_debug_vmsg2(cfs_debug_limit_state_t *cdls, int subsys, int mask,
const char *file, const char *fn, const int line,
const char *format1, va_list args,
- const char *format2, ...)
+ const char *format2, ...)
{
struct trace_cpu_data *tcd = NULL;
struct ptldebug_header header;
{
struct trace_cpu_data *tcd = NULL;
struct ptldebug_header header;
@@
-283,7
+283,7
@@
int libcfs_debug_vmsg2(cfs_debug_limit_state_t *cdls, int subsys, int mask,
* _without_ terminating NULL.
* if needed is to small for this format.
*/
* _without_ terminating NULL.
* if needed is to small for this format.
*/
- for (i
=0;i<2;
i++) {
+ for (i
= 0; i < 2;
i++) {
tage = trace_get_tage(tcd, needed + known_size + 1);
if (tage == NULL) {
if (needed + known_size > CFS_PAGE_SIZE)
tage = trace_get_tage(tcd, needed + known_size + 1);
if (tage == NULL) {
if (needed + known_size > CFS_PAGE_SIZE)
@@
-294,7
+294,8
@@
int libcfs_debug_vmsg2(cfs_debug_limit_state_t *cdls, int subsys, int mask,
goto console;
}
goto console;
}
- string_buf = (char *)cfs_page_address(tage->page)+tage->used+known_size;
+ string_buf = (char *)cfs_page_address(tage->page) +
+ tage->used + known_size;
max_nob = CFS_PAGE_SIZE - tage->used - known_size;
if (max_nob <= 0) {
max_nob = CFS_PAGE_SIZE - tage->used - known_size;
if (max_nob <= 0) {
@@
-311,26
+312,26
@@
int libcfs_debug_vmsg2(cfs_debug_limit_state_t *cdls, int subsys, int mask,
needed = vsnprintf(string_buf, max_nob, format1, ap);
va_end(ap);
}
needed = vsnprintf(string_buf, max_nob, format1, ap);
va_end(ap);
}
-
if (format2) {
remain = max_nob - needed;
if (remain < 0)
remain = 0;
if (format2) {
remain = max_nob - needed;
if (remain < 0)
remain = 0;
-
+
va_start(ap, format2);
va_start(ap, format2);
- needed += vsnprintf(string_buf+needed, remain, format2, ap);
+ needed += vsnprintf(string_buf + needed, remain,
+ format2, ap);
va_end(ap);
}
if (needed < max_nob) /* well. printing ok.. */
break;
}
va_end(ap);
}
if (needed < max_nob) /* well. printing ok.. */
break;
}
-
+
if (*(string_buf+needed-1) != '\n')
printk(KERN_INFO "format at %s:%d:%s doesn't end in newline\n",
file, line, fn);
if (*(string_buf+needed-1) != '\n')
printk(KERN_INFO "format at %s:%d:%s doesn't end in newline\n",
file, line, fn);
-
+
header.ph_len = known_size + needed;
debug_buf = (char *)cfs_page_address(tage->page) + tage->used;
header.ph_len = known_size + needed;
debug_buf = (char *)cfs_page_address(tage->page) + tage->used;