@@ -209,20 +209,21 @@ macro_rules! print_macro (
209
209
( $format_string: path, false , $fmt: expr) => (
210
210
// SAFETY: This hidden macro should only be called by the documented
211
211
// printing macros which ensure the format string is one of the fixed
212
- // ones. All `__MODULE_NAME`s are null-terminated as they are generated
213
- // by the `module!` proc macro.
212
+ // ones. All `__LOG_PREFIX`s are null-terminated as they are generated
213
+ // by the `module!` proc macro or fixed values defined in a kernel
214
+ // crate.
214
215
unsafe {
215
- kernel :: print:: call_printk(
216
+ $crate :: print:: call_printk(
216
217
& $format_string,
217
- crate :: __MODULE_NAME ,
218
+ crate :: __LOG_PREFIX ,
218
219
$fmt. as_bytes( ) ,
219
220
) ;
220
221
}
221
222
) ;
222
223
223
224
// Without extra arguments: no need to format anything (`CONT` case).
224
225
( $format_string: path, true , $fmt: expr) => (
225
- kernel :: print:: call_printk_cont(
226
+ $crate :: print:: call_printk_cont(
226
227
$fmt. as_bytes( ) ,
227
228
) ;
228
229
) ;
@@ -245,12 +246,13 @@ macro_rules! print_macro (
245
246
//
246
247
// SAFETY: This hidden macro should only be called by the documented
247
248
// printing macros which ensure the format string is one of the fixed
248
- // ones. All `__MODULE_NAME`s are null-terminated as they are generated
249
- // by the `module!` proc macro.
249
+ // ones. All `__LOG_PREFIX`s are null-terminated as they are generated
250
+ // by the `module!` proc macro or fixed values defined in a kernel
251
+ // crate.
250
252
unsafe {
251
- kernel :: print:: format_and_call:: <$cont>(
253
+ $crate :: print:: format_and_call:: <$cont>(
252
254
& $format_string,
253
- crate :: __MODULE_NAME ,
255
+ crate :: __LOG_PREFIX ,
254
256
format_args!( $fmt, $( $arg) * ) ,
255
257
) ;
256
258
}
0 commit comments