test_pm.c

简介: /* * test_pm.c * * Test application code for testing the ioctl driver * * Copyright (C) 2005 Farsight *...

/*

* test_pm.c

*

* Test application code for testing the ioctl driver

*

* Copyright (C) 2005 Farsight

*

* This program is free software; you can redistribute it and/or modify

* it under the terms of the GNU General Public License as published by

* the Free Software Foundation; either version 2 of the License, or

* (at your option) any later version.

* This program is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License

* along with this program; if not, write to the Free Software

* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*

*/

#include

#include

#include

#include

#include

#include

#define APM_IOC_STANDBY _IO('A', 1)

#define APM_IOC_SUSPEND _IO('A', 2)

int main (void)

{

int fd;

fd = open ("/dev/apm_bios",O_RDWR);

if (fd

  printf ("fd open failed\n");

  exit(0);

}

printf ("\n/dev/hello opened, fd=%d\n",fd);

ioctl (fd, APM_IOC_SUSPEND);

close (fd);

printf ("/dev/apm_bios closed :)\n");

return 0;

}

相关文章
|
2月前
|
监控 负载均衡 JavaScript
PM2 介绍
【10月更文挑战第11天】
|
7月前
|
敏捷开发 运维 项目管理
一个优秀的PM应该是什么样
【4月更文挑战第14天】一个优秀的PM应该是什么样
|
7月前
test114514
test114514
45 0
|
机器学习/深度学习 人工智能 边缘计算
PM3398B-6P-1–3P-E 80026–172–23
PM3398B-6P-1–3P-E 80026–172–23
74 0
PM3398B-6P-1–3P-E 80026–172–23
|
程序员 API
PIONEER MAGNETICS PM3398B-6P-1-3P-E 80026-172-23
PIONEER MAGNETICS PM3398B-6P-1-3P-E 80026-172-23
83 0
PIONEER MAGNETICS PM3398B-6P-1-3P-E 80026-172-23
|
监控 Ubuntu JavaScript
pm2
pm2
142 0
|
存储 SQL 缓存
test
<h1>test</h1>
93 0
just test
click me
1020 0