summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Yunlian Jiang [Thu, 4 Apr 2013 22:20:43 +0000 (15:20 -0700)]
Remove extra parentheses to pass clang checking.
BUG=chromium:219220
TEST=emerge-lumpy flashmap, the error message is gone.
Change-Id: I5fe8b5c9f1b6802d2487b57b96e93ba2e4e7c226
Reviewed-on: https://gerrit.chromium.org/gerrit/47368
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Han Shen [Tue, 2 Apr 2013 22:48:37 +0000 (15:48 -0700)]
Fix improper use of memset.
For the following code snippet -
char *str;
str = (char *)malloc(...);
memset(str, '\0', sizeof(str));
^^^^^^^^^^^ always equals 4 or 8
TEST=Built.
BUG=None
Change-Id: I42fb6c27a2bd8cdbeb4941d8b01e242132132154
Reviewed-on: https://gerrit.chromium.org/gerrit/47191
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Han Shen <shenhan@google.com>
Commit-Queue: Han Shen <shenhan@google.com>
David Hendricks [Mon, 11 Mar 2013 22:08:53 +0000 (15:08 -0700)]
give strncpy() an appropriate limit
This tells strncpy() to copy max_len bytes instead of strlen(src)
bytes, which will set bytes beyond strlen(src) with null bytes.
We really only need strlen(src) + 1, but for debugging it's
nice not to have a bunch of garbage in the destination buffer.
This fixes a test which err'd due to the lack of a terminating NULL
at the end of dest (do_strcpy is only used by unit tests).
BUG=none
TEST=make test
Change-Id: I73e19a15c91d874702b84877100cbf8d51bf8ac1
Reviewed-on: https://gerrit.chromium.org/gerrit/45143
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
David Hendricks [Mon, 11 Mar 2013 22:17:15 +0000 (15:17 -0700)]
add gcov file extensions (.gcda and .gcno) to .gitignore
BUG=none
TEST=gcov files no longer appear in git status
Change-Id: I455e6445e32a6fdef2cb381b994908a17bde3e0f
Reviewed-on: https://gerrit.chromium.org/gerrit/45142
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Mon, 11 Mar 2013 22:55:57 +0000 (15:55 -0700)]
add PRESUBMIT.cfg
This adds a presubmit config file so we don't get annoying repo upload
warnings for tabs and software license.
BUG=none
BRANCH=none
TEST=tried uploading a change, didn't get nagged for tabs and license
Change-Id: Ia46ae58c6281fb6cc7ac0864d45c613908cb2df4
Reviewed-on: https://gerrit.chromium.org/gerrit/45141
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Wed, 2 May 2012 21:51:57 +0000 (14:51 -0700)]
Add libfmap.a to install and uninstall rules
BUG=none
TEST=locally compiled
"sudo emerge flashmap" (amd64) --> /usr/lib64/libfmap.a
"emerge-daisy flashmap" (32-bit) --> /build/daisy/usr/lib/libfmap.a
adding -C to those commands removes the .a files
Change-Id: I679e040675db4eedd79b2bbc55b49f20d0fe79e4
Mike Frysinger [Wed, 2 Nov 2011 16:33:05 +0000 (12:33 -0400)]
use libdir for .pc install
The .pc files should be under the same libdir as the libraries, so use
the existing $(libdir) variable rather than hardcoding /usr/lib/ when
installing the pkg-config files.
BUG=chromium-os:20636
TEST=`emerge-amd64-generic flashmap` and see .pc files in /usr/lib64/
TEST=`emerge-x86-generic flashmap` and see .pc files in /usr/lib/
Change-Id: I619f6d4c7d04eda0cbe0e3d0fed987a69d764021
David Hendricks [Tue, 1 Nov 2011 23:09:53 +0000 (16:09 -0700)]
set flashmap install prefix to /usr instead of /usr/local
/usr/local/ does not exist on non-developer images in Chrome OS.
BUG=chromium-os:22304
TEST=Built locally and ensured files are placed in /usr instead of /usr/local.
For x86-generic:
/build/x86-generic/usr/lib/libfmap.so
/build/x86-generic/usr/lib/libfmap.so.0
/build/x86-generic/usr/lib/pkgconfig/fmap.pc
/build/x86-generic/usr/lib/libfmap.so.0.0.0
/build/x86-generic/usr/include/fmap.h
/build/x86-generic/usr/sbin/fmap_encode
/build/x86-generic/usr/sbin/fmap_decode
/build/x86-generic/usr/sbin/fmap_csum
For amd64-generic:
/build/amd64-generic/usr/lib/pkgconfig/fmap.pc
/build/amd64-generic/usr/lib64/libfmap.so
/build/amd64-generic/usr/lib64/libfmap.so.0
/build/amd64-generic/usr/lib64/libfmap.so.0.0.0
/build/amd64-generic/usr/include/fmap.h
/build/amd64-generic/usr/sbin/fmap_encode
/build/amd64-generic/usr/sbin/fmap_decode
/build/amd64-generic/usr/sbin/fmap_csum
Change-Id: I64278c91c4b52f4d89d8d174a579ddb62da3a0c1
David Hendricks [Wed, 26 Oct 2011 03:39:44 +0000 (20:39 -0700)]
Update libfmap naming and install rule
This updates the libfmap .so filename to better match GNU convention
and also updates the soname (seen when running objdump -x). It also
updates the installation so that the package installs symbolic links.
(Note: There was also some disambiguation between the lib directory
belonging to the system and the lib directory belonging to the source)
BUG=chrome-os-partner:6600
TEST=locally built for arm-generic and amd64-generic targets
Change-Id: Ib1002f20a1a324bd9583f617f59cf3804e06659c
David Hendricks [Wed, 26 Oct 2011 01:40:48 +0000 (18:40 -0700)]
Revert "add version number to -lfmap provided by pkg-config"
This turned out to be less useful than originally thought. Nothing broke, but nothing was gained either. Reverting.
This reverts commit
e4b12265cf338b774f5bf338db7fb7c587387293
David Hendricks [Tue, 25 Oct 2011 01:22:10 +0000 (18:22 -0700)]
add version number to -lfmap provided by pkg-config
This is intended as a short-term fix to some linking issues caused by
the strange soname configuration currently used in this package, namely
that successfully linking other packages to libfmap depends on a symlink
being created by ldconfig, which is currently created more or less on accident.
Future versions will likely revert this change and come with some other
changes to the Makefile.
BUG=none
TEST=See notes below.
Before:
pkg-config-x86-generic --libs-only-l fmap
-lfmap
After:
pkg-config-x86-generic --libs-only-l fmap
-lfmap-0.3
Change-Id: I103e7661d0a1b322e7b477e28f366da2cc499476
David Hendricks [Wed, 28 Sep 2011 00:04:48 +0000 (17:04 -0700)]
Add pkg-config support to flashmap
This adds a rule to the Makefile to generate a pkg-config .pc file
and install it if:
1) /usr/lib/pkgconfig is a directory
2) The user sets an environment variable.
The latter is useful for sandboxed environments since /usr/lib/pkgconfig
might exist in the target environment but not the sandbox where flashmap
is being built.
BUG=none
TEST=Test compiled on Goobuntu, cros_sdk (emerge), and x86-generic (emerge-x86-generic)
Change-Id: Id45ef5300b693f8258671729b624b82ea1780965
David Hendricks [Tue, 6 Sep 2011 22:20:12 +0000 (15:20 -0700)]
Conditionally assign toolchain variables
tc-export apparently does not set the CROSS_COMPILE prefix for tools like gcc,
ar, etc. Instead, it seems to set the variables directly.
Conditionally assigning them in the Makefile with "?=" instead of "=" or ":="
makes cross compilation work for board overlays. With "=" instead of "?=",
compilation fails complaining that "atom" is not value for -mtune and -march.
BUG=none
TEST=Compiled for host (amd64), x86-generic and tegra2_seaboard
Change-Id: I9ddb2eb769d53be3ade5e325e9b83f343b9b19ba
David Hendricks [Wed, 31 Aug 2011 19:29:48 +0000 (12:29 -0700)]
Initial import of flashmap