Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f3589bfa
Commit
f3589bfa
authored
Mar 16, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: fix for building in userspace
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
1c31b83a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
fs/bcachefs/super.c
fs/bcachefs/super.c
+16
-16
No files found.
fs/bcachefs/super.c
View file @
f3589bfa
...
...
@@ -87,20 +87,27 @@ const char * const bch2_fs_flag_strs[] = {
NULL
};
void
bch2_print_opts
(
struct
bch_opts
*
opts
,
const
char
*
fmt
,
...
)
static
void
bch2_print_maybe_redirect
(
struct
stdio_redirect
*
stdio
,
const
char
*
fmt
,
va_list
args
)
{
struct
stdio_redirect
*
stdio
=
(
void
*
)(
unsigned
long
)
opts
->
stdio
;
va_list
args
;
va_start
(
args
,
fmt
);
if
(
likely
(
!
stdio
))
{
vprintk
(
fmt
,
args
);
}
else
{
#ifdef __KERNEL__
if
(
unlikely
(
stdio
))
{
if
(
fmt
[
0
]
==
KERN_SOH
[
0
])
fmt
+=
2
;
bch2_stdio_redirect_vprintf
(
stdio
,
true
,
fmt
,
args
);
return
;
}
#endif
vprintk
(
fmt
,
args
);
}
void
bch2_print_opts
(
struct
bch_opts
*
opts
,
const
char
*
fmt
,
...)
{
struct
stdio_redirect
*
stdio
=
(
void
*
)(
unsigned
long
)
opts
->
stdio
;
va_list
args
;
va_start
(
args
,
fmt
);
bch2_print_maybe_redirect
(
stdio
,
fmt
,
args
);
va_end
(
args
);
}
...
...
@@ -110,14 +117,7 @@ void __bch2_print(struct bch_fs *c, const char *fmt, ...)
va_list
args
;
va_start
(
args
,
fmt
);
if
(
likely
(
!
stdio
))
{
vprintk
(
fmt
,
args
);
}
else
{
if
(
fmt
[
0
]
==
KERN_SOH
[
0
])
fmt
+=
2
;
bch2_stdio_redirect_vprintf
(
stdio
,
true
,
fmt
,
args
);
}
bch2_print_maybe_redirect
(
stdio
,
fmt
,
args
);
va_end
(
args
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment