哪个系统调用返回Linux中与系统相连的设备列表? [英] Which system call returns list of devices attached to system in Linux?

查看:71
本文介绍了哪个系统调用返回Linux中与系统相连的设备列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个C/Java程序,该程序将显示连接到系统的设备的列表.在这方面的任何帮助都受到高度赞赏.

I am trying to write a C / Java program which will display list of devices attached to system. Any help in this regard is highly appreciated.

推荐答案

lsusb command will return all the USB devices attached (for Linux kernel 2.3.15 or newer)

如果要调用c函数调用,请在此处直接从您的代码.

there's some advice here if you want to call the c function call directly from your code.

这篇关于哪个系统调用返回Linux中与系统相连的设备列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆