diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-03 22:50:54 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-19 03:43:33 +0200 |
commit | 9e10833e841f446286ab38577335d1f0a4a8c555 (patch) | |
tree | 17d8fde57374066a768d8dae0e6308441afd7233 /onlineupdate | |
parent | c13b1c56e57dfb0d56a3e6d726377959e1d3bd78 (diff) |
remove unused hard link support
Change-Id: I7f40598df74c8731b13c37b8adaa636086d204b4
Diffstat (limited to 'onlineupdate')
-rw-r--r-- | onlineupdate/source/update/updater/updater.cxx | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx index 3c5baca1e3ac..1e36b4d300f8 100644 --- a/onlineupdate/source/update/updater/updater.cxx +++ b/onlineupdate/source/update/updater/updater.cxx @@ -112,8 +112,6 @@ struct UpdateServerThreadArgs #define USE_EXECV #endif -# define MAYBE_USE_HARD_LINKS 0 - #if defined(VERIFY_MAR_SIGNATURE) && !defined(_WIN32) && !defined(MACOSX) #include <nss.h> #include <nspr.h> @@ -639,26 +637,6 @@ static int ensure_copy_symlink(const NS_tchar *path, const NS_tchar *dest) } #endif -#if MAYBE_USE_HARD_LINKS -/* - * Creates a hardlink (destFilename) which points to the existing file - * (srcFilename). - * - * @return 0 if successful, an error otherwise - */ - -static int -create_hard_link(const NS_tchar *srcFilename, const NS_tchar *destFilename) -{ - if (link(srcFilename, destFilename) < 0) - { - LOG(("link(%s, %s) failed errno = %d", srcFilename, destFilename, errno)); - return WRITE_ERROR; - } - return OK; -} -#endif - // Copy the file named path onto a new file named dest. static int ensure_copy(const NS_tchar *path, const NS_tchar *dest) { @@ -689,18 +667,6 @@ static int ensure_copy(const NS_tchar *path, const NS_tchar *dest) } #endif -#if MAYBE_USE_HARD_LINKS - if (sUseHardLinks) - { - if (!create_hard_link(path, dest)) - { - return OK; - } - // Since we failed to create the hard link, fall through and copy the file. - sUseHardLinks = false; - } -#endif - AutoFile infile(ensure_open(path, NS_T("rb"), ss.st_mode)); if (!infile) { |