Skip to content

Commit f90ed0f

Browse files
authored
Merge pull request #16 from viveris/master
Sync Fork from Upstream
2 parents 740f433 + f459eba commit f90ed0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+180
-109
lines changed

Release-notes.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@
33
* Lightweight USB Media Transfer Protocol (MTP)
44
* responder
55
*
6-
* Copyright (c) 2018 - 2021 Viveris Technologies
6+
* Copyright (c) 2018 - 2024 Viveris Technologies
77
*
88
* https://github.com/viveris/uMTP-Responder
99
*
1010
* Release notes
1111
=================================================
1212

13+
Noteworthy changes in release v1.6.8 (2024-Jul-8)
14+
=================================================
15+
16+
* Fix the GetDeviceInfo operation : It can be used without sending an OpenSession command
17+
according to the MTP specification.
18+
19+
* Unicode string functions fixed to work on pre ARMv7 CPUs (Short values unaligned accesses fixed).
20+
21+
* Systemd support : Can now tell Systemd that uMTP-Responder is ready (SYSTEMD_NOTIFY build option).
22+
23+
* Code fixes and improvements.
24+
1325
Noteworthy changes in release v1.6.2 (2021-Dec-26)
1426
=================================================
1527

conf/umtprd.conf

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,51 @@
99
loop_on_disconnect 0
1010

1111
# Force the default UID/GID to use for each storage file operations.
12-
# Note : When no default UID/GID are specified the umtprd process UID/GID
12+
# Note : When no default UID/GID are specified the umtprd process UID/GID
1313
# are used instead.
1414

1515
#default_uid 33
16+
17+
## group: mtp
1618
#default_gid 33
1719

20+
#
21+
# umask value for uploaded folders and files
22+
#
23+
# Uncomment the umask command line if you want to
24+
# override the system default umask value for
25+
# the uploaded folders and files.
26+
#
27+
# umask format description :
28+
#
29+
# umask 022
30+
# ugo
31+
#
32+
# u : user/owner part of mask
33+
# g : group part of mask
34+
# o : others/not-in-group part of mask
35+
#
36+
# Octal digit definition in umask command :
37+
#
38+
# 0 : Any permission may be set. (Read, Write, eXecute)
39+
# 1 : Setting of execute permission is prohibited. (Read and Write)
40+
# 2 : Setting of write permission is prohibited. (Read and eXecute)
41+
# 3 : Setting of write and execute permissions is prohibited. (Read only)
42+
# 4 : Setting of read permission is prohibited. (Write and eXecute)
43+
# 5 : Setting of read and execute permissions is prohibited. (Write only)
44+
# 6 : Setting of read and write permissions is prohibited. (eXecute only)
45+
# 7 : All permissions are prohibited from being set. (No permission)
46+
#
47+
48+
# Example :
49+
# User : Read, Write, eXecute. (0)
50+
# Group : Read, eXecute but no Write. (2)
51+
# Others : Read, eXecute but no Write, (2)
52+
53+
#umask 022
54+
1855
# Storage command : Create add a storage entry point. Up to 16 entry points supported
19-
# Syntax : storage "PATH" "NAME" "OPTIONS"
56+
# Syntax : storage "PATH" "NAME" "OPTIONS"
2057
# Possible store options :
2158
# "rw" = read/write access
2259
# "ro" = read only
@@ -36,14 +73,6 @@ storage "/" "lockable root folder" "rw,locked"
3673

3774
storage "/home/user" "user folder" "rw,locked,uid=33,gid=33"
3875

39-
#
40-
# Uncomment the following line if you want to
41-
# override the system default umask value for
42-
# the uploaded files.
43-
#
44-
45-
#umask 022
46-
4776
# Set the USB manufacturer string
4877

4978
manufacturer "Viveris Technologies"
@@ -81,6 +110,14 @@ usb_dev_version 0x3008
81110

82111
# no_inotify 0x1
83112

113+
# Sync when close
114+
# Set this option to 0x1 to request all file data to be flushed from the RAM buffer to the
115+
# internal storage after transfer is completed, this prevents data loss in the case where
116+
# user un-plugged a non-battery-powered device too soon when there are still buffered data
117+
# stayed in the RAM
118+
119+
# sync_when_close 0x0
120+
84121
#
85122
# Internal buffers size
86123
#

inc/default_cfg.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* uMTP Responder
3-
* Copyright (c) 2018 - 2021 Viveris Technologies
3+
* Copyright (c) 2018 - 2024 Viveris Technologies
44
*
55
* uMTP Responder is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public
@@ -43,11 +43,11 @@
4343

4444
#define USB_FFS_MODE 1
4545

46-
#define USB_DEV "/dev/ffs-umtp/ep0"
46+
#define USB_DEV "/dev/ffs-mtp/ep0"
4747

48-
#define USB_EPIN "/dev/ffs-umtp/ep1"
49-
#define USB_EPOUT "/dev/ffs-umtp/ep2"
50-
#define USB_EPINTIN "/dev/ffs-umtp/ep3"
48+
#define USB_EPIN "/dev/ffs-mtp/ep1"
49+
#define USB_EPOUT "/dev/ffs-mtp/ep2"
50+
#define USB_EPINTIN "/dev/ffs-mtp/ep3"
5151

5252
#define MANUFACTURER "Viveris Technologies"
5353
#define PRODUCT "The Viveris Product !"

inc/fs_handles_db.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* uMTP Responder
3-
* Copyright (c) 2018 - 2021 Viveris Technologies
3+
* Copyright (c) 2018 - 2024 Viveris Technologies
44
*
55
* uMTP Responder is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public

inc/logs_out.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* uMTP Responder
3-
* Copyright (c) 2018 - 2021 Viveris Technologies
3+
* Copyright (c) 2018 - 2024 Viveris Technologies
44
*
55
* uMTP Responder is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public

inc/mtp.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* uMTP Responder
3-
* Copyright (c) 2018 - 2021 Viveris Technologies
3+
* Copyright (c) 2018 - 2024 Viveris Technologies
44
*
55
* uMTP Responder is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public
@@ -135,6 +135,8 @@ typedef struct mtp_ctx_
135135

136136
int no_inotify;
137137

138+
int sync_when_close;
139+
138140
int uid,euid;
139141
int gid,egid;
140142

@@ -169,8 +171,8 @@ void mtp_deinit_responder(mtp_ctx * ctx);
169171

170172
int build_response(mtp_ctx * ctx, uint32_t tx_id, uint16_t type, uint16_t status, void * buffer, int maxsize, void * datain,int size);
171173
int check_and_send_USB_ZLP(mtp_ctx * ctx , int size);
172-
int parse_incomming_dataset(mtp_ctx * ctx,void * datain,int size,uint32_t * newhandle, uint32_t parent_handle, uint32_t storage_id);
174+
int parse_incoming_dataset(mtp_ctx * ctx,void * datain,int size,uint32_t * newhandle, uint32_t parent_handle, uint32_t storage_id);
173175

174-
#define APP_VERSION "v1.6.6"
176+
#define APP_VERSION "v1.6.8"
175177

176178
#endif

inc/mtp_cfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* uMTP Responder
3-
* Copyright (c) 2018 - 2021 Viveris Technologies
3+
* Copyright (c) 2018 - 2024 Viveris Technologies
44
*
55
* uMTP Responder is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public

inc/mtp_constant_strings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* uMTP Responder
3-
* Copyright (c) 2018 - 2021 Viveris Technologies
3+
* Copyright (c) 2018 - 2024 Viveris Technologies
44
*
55
* uMTP Responder is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public

inc/mtp_datasets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* uMTP Responder
3-
* Copyright (c) 2018 - 2021 Viveris Technologies
3+
* Copyright (c) 2018 - 2024 Viveris Technologies
44
*
55
* uMTP Responder is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public

inc/mtp_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* uMTP Responder
3-
* Copyright (c) 2018 - 2021 Viveris Technologies
3+
* Copyright (c) 2018 - 2024 Viveris Technologies
44
*
55
* uMTP Responder is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public

0 commit comments

Comments
 (0)