@@ -11,7 +11,7 @@ use std::{
1111
1212use serde:: Deserialize ;
1313
14- use crate :: { file_utils :: cmdline_snippet , os_release:: OsRelease , Error } ;
14+ use crate :: { os_release:: OsRelease , Error } ;
1515
1616/// Control kernel discovery mechanism
1717#[ derive( Debug ) ]
@@ -70,8 +70,6 @@ pub struct Kernel {
7070
7171 /// Recorded variant type
7272 pub variant : Option < String > ,
73-
74- pub cmdline : Option < String > ,
7573}
7674
7775/// Denotes the kind of auxiliary file
@@ -119,24 +117,6 @@ impl Schema<'_> {
119117 }
120118 }
121119
122- fn load_cmdline ( kernel : & Kernel ) -> Result < String , Error > {
123- // Load local cmdline snippets for this kernel entry
124- let mut cmdline = String :: new ( ) ;
125- for snippet in kernel
126- . extras
127- . iter ( )
128- . filter ( |e| matches ! ( e. kind, crate :: AuxiliaryKind :: Cmdline ) )
129- {
130- let snippet = cmdline_snippet ( & snippet. path ) ?;
131- cmdline. push_str ( & snippet) ;
132- cmdline. push ( ' ' ) ;
133- }
134-
135- log:: trace!( "kernel-specific cmdline for {:?}: {cmdline}" , kernel. image) ;
136-
137- Ok ( cmdline. trim ( ) . to_string ( ) )
138- }
139-
140120 /// Discover any legacy kernels
141121 fn legacy_kernels (
142122 namespace : & ' static str ,
@@ -171,7 +151,6 @@ impl Schema<'_> {
171151 initrd : vec ! [ ] ,
172152 extras : vec ! [ ] ,
173153 variant : Some ( variant. to_string ( ) ) ,
174- cmdline : None ,
175154 } ,
176155 ) ;
177156 }
@@ -266,7 +245,6 @@ impl Schema<'_> {
266245 kernel
267246 . extras
268247 . sort_by_key ( |e| e. path . display ( ) . to_string ( ) . to_lowercase ( ) ) ;
269- kernel. cmdline = Self :: load_cmdline ( kernel) . ok ( ) . filter ( |s| !s. is_empty ( ) ) ;
270248 }
271249 Ok ( kernels. into_values ( ) . collect :: < Vec < _ > > ( ) )
272250 }
@@ -289,7 +267,6 @@ impl Schema<'_> {
289267 initrd : vec ! [ ] ,
290268 extras : vec ! [ ] ,
291269 variant : None ,
292- cmdline : None ,
293270 } ,
294271 ) )
295272 } )
@@ -350,7 +327,6 @@ impl Schema<'_> {
350327 kernel
351328 . extras
352329 . sort_by_key ( |e| e. path . display ( ) . to_string ( ) . to_lowercase ( ) ) ;
353- kernel. cmdline = Self :: load_cmdline ( kernel) . ok ( ) . filter ( |s| !s. is_empty ( ) ) ;
354330 }
355331 }
356332
0 commit comments