summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/modulesinfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp
index 29cce90..7abad69 100644
--- a/noncore/settings/sysinfo/modulesinfo.cpp
+++ b/noncore/settings/sysinfo/modulesinfo.cpp
@@ -93,87 +93,87 @@ ModulesInfo::~ModulesInfo()
void ModulesInfo::updateData()
{
char modname[64];
char usage[200];
int modsize, usecount;
ModulesView->clear();
FILE *procfile = fopen( ( QString ) ( "/proc/modules"), "r");
if ( procfile )
{
while ( true ) {
int success = fscanf( procfile, "%s%d%d%[^\n]", modname, &modsize, &usecount, usage );
if ( success == EOF )
break;
QString qmodname = QString( modname );
QString qmodsize = QString::number( modsize ).rightJustify( 6, ' ' );
QString qusecount = QString::number( usecount ).rightJustify( 2, ' ' );
QString qusage = QString( usage );
( void ) new QListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage );
}
fclose( procfile );
}
}
void ModulesInfo::slotSendClicked()
{
if ( !ModulesView->currentItem() )
{
return;
}
QString capstr = tr( "You really want to execute\n" );
capstr.append( CommandCB->currentText() );
capstr.append( "\nfor this module?" );
QString modname = ModulesView->currentItem()->text( 0 );
if ( QMessageBox::warning( this, modname, capstr,
QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes )
{
QString command = "/sbin/";
command.append( CommandCB->currentText() );
command.append( " " );
command.append( modname );
FILE* stream = popen( command, "r" );
if ( stream )
pclose( stream );
}
}
void ModulesInfo::viewModules( QListViewItem *modules )
{
QString modname = modules->text( 0 );
QString capstr = "Module: ";
capstr.append( modname );
ModulesDtl->setCaption( capstr );
- QString command = "/sbin/modinfo -nad ";
+ QString command = "/sbin/modinfo ";
command.append( modname );
FILE* modinfo = popen( command, "r" );
if ( modinfo )
{
char line[200];
ModulesDtl->detailView->setText( " Details:\n------------\n" );
while( true )
{
int success = fscanf( modinfo, "%[^\n]\n", line );
if ( success == EOF )
break;
ModulesDtl->detailView->append( line );
}
pclose( modinfo );
}
ModulesDtl->showMaximized();
}