Skip to content

Commit

Permalink
add newline in stream-conv.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Yifan Yuan <tuji.yyf@alibaba-inc.com>
  • Loading branch information
BigVan committed Dec 8, 2023
1 parent d38dd2b commit 4be2180
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 23 deletions.
12 changes: 1 addition & 11 deletions src/example_config/stream-conv.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# // {
# // "serverConfig": {
# // "uds": "/var/run/stream_conv.sock",
# // "workdir": "/tmp/stream_conv"
# // },
# // "logConfig": {
# // "level": 0,
# // "mode": "stdout"
# // }
# // }
globalConfig:
workDir: /tmp/stream_conv
udsAddr: /var/run/stream_conv.sock
Expand All @@ -20,4 +10,4 @@ globalConfig:
mode: stdout
rotateNum: 3
limitSizeMB: 10
path: /var/log/overlaybd/stream_convertor.log
path: /var/log/overlaybd/stream_convertor.log
2 changes: 0 additions & 2 deletions src/overlaybd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ add_subdirectory(tar)
add_subdirectory(extfs)
add_subdirectory(gzip)
add_subdirectory(gzindex)

add_subdirectory(stream_convertor)


add_library(overlaybd_lib INTERFACE)
target_include_directories(overlaybd_lib INTERFACE
${PHOTON_INCLUDE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/overlaybd/gzindex/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
file(GLOB SOURCE_TAR "*.cpp")
add_library(gzindex_lib STATIC ${SOURCE_TAR} )
add_library(gzindex_lib STATIC ${SOURCE_TAR})

target_include_directories(gzindex_lib PUBLIC ${PHOTON_INCLUDE_DIR})
target_link_libraries(gzindex_lib photon_static)
Expand Down
2 changes: 0 additions & 2 deletions src/overlaybd/gzindex/gzip_index_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
// #include "../zfile/crc32/crc32c.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
5 changes: 0 additions & 5 deletions src/overlaybd/stream_convertor/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ struct LogConfigPara : public App::ConfigGroup {
APPCFG_PARA(mode, std::string, "stdout");
};

// struct ServerConfigPara : public App::ConfigGroup {
// APPCFG_CLASS

// };

struct GlobalConfigPara : public App::ConfigGroup {
APPCFG_CLASS;
APPCFG_PARA(udsAddr, std::string, "");
Expand Down
3 changes: 2 additions & 1 deletion src/overlaybd/tar/libtar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,14 @@ ssize_t UnTar::dump_tar_headers(photon::fs::IFile *as) {
auto next = read_header(as);
if (next == -1) {
return -1;
} else if (next == 1) {
break;
}
count++;
if (TH_ISREG(header)) {
auto size = get_size();
file->lseek(((size + T_BLOCKSIZE - 1) / T_BLOCKSIZE) * T_BLOCKSIZE, SEEK_CUR); // skip size
}
if (next != 0) break;
}
return count;
}
Expand Down
2 changes: 1 addition & 1 deletion src/overlaybd/tar/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ link_directories($ENV{GFLAGS}/lib)
include_directories($ENV{GTEST}/googletest/include)
link_directories($ENV{GTEST}/lib)

add_executable(untar_test test.cpp )
add_executable(untar_test test.cpp)
target_include_directories(untar_test PUBLIC ${PHOTON_INCLUDE_DIR})
target_link_libraries(untar_test gtest gtest_main pthread photon_static
tar_lib extfs_lib lsmt_lib gzip_lib gzindex_lib checksum_lib)
Expand Down

0 comments on commit 4be2180

Please sign in to comment.