Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ota/fix sudo issue #1487

Merged
merged 24 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
570da97
Fix sudo file path issue
pvyawaha Dec 12, 2020
93f803f
fix path for update file
pvyawaha Dec 12, 2020
8dea7a1
fix compiler warning
pvyawaha Dec 12, 2020
05922a2
Update platform/posix/ota_pal/source/ota_pal_posix.c
pvyawaha Dec 12, 2020
c6a48f2
fix ut
divekarshubham Dec 12, 2020
130011b
fix ut
divekarshubham Dec 12, 2020
2445cb9
Dump platform image state path on error
pvyawaha Dec 12, 2020
8e4aebf
Update submodule ptr
divekarshubham Dec 13, 2020
024456d
Remove snprintf mock since it's not being used
yanjos-dev Dec 13, 2020
6355e90
Remove remaining usage of snprintf in OTA PAL tests
yanjos-dev Dec 13, 2020
55d100b
Add getcwd mock to OTA PAL unit tests
yanjos-dev Dec 13, 2020
8853b8e
Remove unused variable from OTA PAl tests
yanjos-dev Dec 13, 2020
2af54c1
Merge branch 'main' of github.com:aws/aws-iot-device-sdk-embedded-C i…
divekarshubham Dec 13, 2020
9627a0a
Extracting file path generation in a separate function
divekarshubham Dec 13, 2020
7b0541a
Removing unused variables
divekarshubham Dec 13, 2020
5bf5d25
Add OTA PAL test for long file paths
yanjos-dev Dec 13, 2020
7a5c6a3
Addressing PR comments
divekarshubham Dec 14, 2020
4504c03
Merge UT changes
divekarshubham Dec 14, 2020
4784e65
spell fix
divekarshubham Dec 14, 2020
a3d852d
Refactoring to use status and spell fix
divekarshubham Dec 14, 2020
28c31fa
Fix OTA PAL test asserts
yanjos-dev Dec 14, 2020
28d0453
Remove unused variable
yanjos-dev Dec 14, 2020
8e4a008
Using strcat instead on strncat and ota submodule update
divekarshubham Dec 14, 2020
bcf7882
Merge branch 'ota/fix_sudo_issue' of github.com:aws/aws-iot-device-sd…
divekarshubham Dec 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions platform/lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ basedefs
bio
bitmasking
blocksize
blocksize
bool
bootable
bootloader
Expand All @@ -27,6 +28,7 @@ cert
cmock
com
config
config
connectsuccessindex
const
couldn
Expand Down Expand Up @@ -122,26 +124,45 @@ ota
otafile
otaimagestateaborted
otaimagestateaccepted
otaimagestaterejected
otaimagestatetesting
otaimagestateinvalid
otaimagestatependingcommit
otaimagestaterejected
otaimagestaterejected
otaimagestatetesting
otaimagestateunknown
otalastimagestate
otapal_closefile
otapalabortfailed
otapalactivatefailed
otapalbadimagestate
otapalbadsignercert
otapalbootinfocreatefailed
otapalbufferinsufficient
otapalcommitfailed
otapalcwdfailed
otapalfileabort
otapalfileclose
otapalfilegensuccess
otapalimagestateinvalid
otapalimagestatependingcommit
otapalimagestateunknown
otapalimagestatevalid
otapalnullfilecontext
otapalnullfilecontext
otapaloutofmemory
otapaloutofmemory
otapalrejectfailed
otapalrejectfailed
otapalrxfilecreatefailed
otapalrxfilecreatefailed
otapalrxfiletoolarge
otapalrxfiletoolarge
otapalsignaturecheckfailed
otapalsignaturecheckfailed
otapalsuccess
otapalsuccess
otapaluninitialized
otapal_closefile
otapaluninitialized
paddrinfo
palpnprotos
param
Expand All @@ -151,9 +172,11 @@ pcdata
pcertfilepath
pclientcertpath
pdata
pdata
pem
pfile
pfilecontext
pfilecontext
pfilepath
pformat
phostname
Expand Down Expand Up @@ -199,7 +222,6 @@ sizeof
sleeptimems
sni
snihostname
snprintf
sockaddr
sockets_invalid_parameter
socketstatus
Expand Down Expand Up @@ -239,23 +261,3 @@ variadic
vtaskdelay
writesize
www
blocksize
config
otapalsuccess
otapaluninitialized
otapaloutofmemory
otapalnullfilecontext
otapalsignaturecheckfailed
otapalrxfilecreatefailed
otapalrxfiletoolarge
otapalbootinfocreatefailed
otapalbadsignercert
otapalbadimagestate
otapalabortfailed
otapalrejectfailed
otapalcommitfailed
otapalactivatefailed
otapalfileabort
otapalfileclose
pdata
pfilecontext
13 changes: 11 additions & 2 deletions platform/posix/ota_pal/source/include/ota_pal_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,22 @@

#include "ota.h"



/**
* @brief Maximum file path length on Linux
*/
#define OTA_FILE_PATH_LENGTH_MAX 512

/**
* @brief The OTA platform interface status for generating
* absolute file path from the incoming relative file path.
*/
typedef enum OtaPalPathGenStatus
{
OtaPalFileGenSuccess, /*!< @brief Absolute path generation success. */
OtaPalCWDFailed, /*!< @brief getcwd failed to output path. */
OtaPalBufferInsufficient /*!< @brief Buffer insufficient for storing the file path. */
} OtaPalPathGenStatus_t;

/**
* @brief Abort an OTA transfer.
*
Expand Down
Loading