aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjulianoes <julian@oes.ch>2014-03-01 10:35:06 +0100
committerjulianoes <julian@oes.ch>2014-03-01 10:35:06 +0100
commit3dd3ba4637bfe6d665f20c1e5712ac22131b5b22 (patch)
tree8fc0f13ac2d3cfc849d83c5d820f77941f2c95b5 /src
parent9b6f08dc7eefb2e4a055b1d89a0cec0022299ff9 (diff)
parent5ed5e04cb24c261c9a8b40857bd1d733238f847e (diff)
downloadpx4-firmware-3dd3ba4637bfe6d665f20c1e5712ac22131b5b22.tar.gz
px4-firmware-3dd3ba4637bfe6d665f20c1e5712ac22131b5b22.tar.bz2
px4-firmware-3dd3ba4637bfe6d665f20c1e5712ac22131b5b22.zip
Merge pull request #688 from PX4/sdlog2_fix
log corruption lseek workaround
Diffstat (limited to 'src')
-rw-r--r--src/modules/sdlog2/logbuffer.c3
-rw-r--r--src/modules/sdlog2/sdlog2.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/sdlog2/logbuffer.c b/src/modules/sdlog2/logbuffer.c
index b3243f7b5..6a29d7e5c 100644
--- a/src/modules/sdlog2/logbuffer.c
+++ b/src/modules/sdlog2/logbuffer.c
@@ -1,7 +1,6 @@
/****************************************************************************
*
- * Copyright (c) 2013 PX4 Development Team. All rights reserved.
- * Author: Anton Babushkin <anton.babushkin@me.com>
+ * Copyright (c) 2013, 2014 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c
index c4fafb5a6..41e2248bb 100644
--- a/src/modules/sdlog2/sdlog2.c
+++ b/src/modules/sdlog2/sdlog2.c
@@ -1,8 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2014 PX4 Development Team. All rights reserved.
- * Author: Lorenz Meier <lm@inf.ethz.ch>
- * Anton Babushkin <anton.babushkin@me.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -450,6 +448,7 @@ static void *logwriter_thread(void *arg)
n = available;
}
+ lseek(log_fd, 0, SEEK_CUR);
n = write(log_fd, read_ptr, n);
should_wait = (n == available) && !is_part;