816365a74a78696368158485d757d15bbdde0e1a
[platform/core/system/swap-manager.git] / daemon / ioctl_commands.c
1 /* SWAP Device ioctl commands */
2
3 #include "ioctl_commands.h"
4 #include "debug.h"
5 #include "da_protocol.h"
6 #include "daemon.h"
7
8 #include <errno.h>
9
10 //send message to device
11 int ioctl_send_msg(struct msg_data_t *msg)
12 {
13         LOGI("write to device\n");
14         if (ioctl(manager.buf_fd, 0, msg) == -1) {
15                 LOGE("write to device: %s\n", strerror(errno));
16                 return 1;
17         }
18         return 0;
19 }
20
21