diff options
author | Linus Walleij <triad@df.lth.se> | 2006-02-03 09:46:22 +0000 |
---|---|---|
committer | Linus Walleij <triad@df.lth.se> | 2006-02-03 09:46:22 +0000 |
commit | eb8c6fe031f5ba155cabcbfabcc235acffbc2fb7 (patch) | |
tree | d0062f1898e9bff04e673570289b9c062305c104 /examples/detect.c | |
download | libmtp-eb8c6fe031f5ba155cabcbfabcc235acffbc2fb7.tar.gz |
Initial revision
Diffstat (limited to 'examples/detect.c')
-rw-r--r-- | examples/detect.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/detect.c b/examples/detect.c new file mode 100644 index 0000000..22da6c2 --- /dev/null +++ b/examples/detect.c @@ -0,0 +1,17 @@ +#include "common.h" + +int main (int argc, char **argv) +{ + mtpdevice_t *device; + + LIBMTP_Init(); + device = LIBMTP_Get_First_Device(); + if (device == NULL) { + printf("No devices.\n"); + exit (0); + } + LIBMTP_Release_Device(device); + printf("OK.\n"); + exit (0); +} + |