181
181
case FS_REISER4 : return "reiser4progs" ;
182
182
case FS_REISERFS : return "reiserfsprogs" ;
183
183
case FS_UFS : return "" ;
184
case FS_XFS : return "xfsprogs" ;
184
case FS_XFS : return "xfsprogs, xfsdump" ;
186
186
default : return "" ;
327
327
return exit_status ;
330
Glib::ustring Utils::regexp_label( const Glib::ustring & text,
331
const Glib::ustring & regular_sub_expression )
330
Glib::ustring Utils::regexp_label( const Glib::ustring & text
331
, const Glib::ustring & pattern
333
//Extract text from a regular sub-expression. E.g., "text we don't want (text we want)"
334
Glib::ustring label = "";
337
regmatch_t pmatch[ 2 ] ;
338
int rc = regcomp( &preg, regular_sub_expression .c_str(), REG_EXTENDED | REG_ICASE | REG_NEWLINE ) ;
341
if (regexec(&preg, text.c_str(), nmatch, pmatch, 0) == 0)
342
label = text .substr( pmatch[1].rm_so, pmatch[1].rm_eo - pmatch[1].rm_so ) ;
334
//Extract text from a regular sub-expression or pattern.
335
// E.g., "text we don't want (text we want)"
336
std::vector<Glib::ustring> results;
337
Glib::RefPtr<Glib::Regex> myregexp =
338
Glib::Regex::create( pattern
339
, Glib::REGEX_CASELESS | Glib::REGEX_MULTILINE
342
results = myregexp ->split( text );
344
if ( results .size() >= 2 )
345
return results[ 1 ] ;
349
350
Glib::ustring Utils::fat_compliant_label( const Glib::ustring & label )