* Define PFX globally
* Limit block size in print command by cfg.maxbsize bytes (Thanks phr0nak)
This commit is contained in:
parent
8189c43299
commit
f28d12fe25
22
Makefile
22
Makefile
|
@ -52,22 +52,22 @@ pkgcfg:
|
|||
cd libr && ${MAKE} pkgcfg
|
||||
|
||||
install-man:
|
||||
mkdir -p ${DESTDIR}/${PREFIX}/share/man/man1
|
||||
for a in man/*.1 ; do ${INSTALL_MAN} $$a ${DESTDIR}/${PREFIX}/share/man/man1 ; done
|
||||
cd ${DESTDIR}/${PREFIX}/share/man/man1 && ln -fs radare2.1 r2.1
|
||||
mkdir -p ${PFX}/share/man/man1
|
||||
for a in man/*.1 ; do ${INSTALL_MAN} $$a ${PFX}/share/man/man1 ; done
|
||||
cd ${PFX}/share/man/man1 && ln -fs radare2.1 r2.1
|
||||
|
||||
install-man-symlink:
|
||||
mkdir -p ${DESTDIR}/${PREFIX}/share/man/man1
|
||||
cd man && for a in *.1 ; do ln -fs `pwd`/$$a ${DESTDIR}/${PREFIX}/share/man/man1/$$a ; done
|
||||
cd ${DESTDIR}/${PREFIX}/share/man/man1 && ln -fs radare2.1 r2.1
|
||||
mkdir -p ${PFX}/share/man/man1
|
||||
cd man && for a in *.1 ; do ln -fs `pwd`/$$a ${PFX}/share/man/man1/$$a ; done
|
||||
cd ${PFX}/share/man/man1 && ln -fs radare2.1 r2.1
|
||||
|
||||
install-doc:
|
||||
${INSTALL_DIR} ${DESTDIR}${PREFIX}/share/doc/radare2
|
||||
for a in doc/* ; do ${INSTALL_DATA} $$a ${DESTDIR}/${PREFIX}/share/doc/radare2 ; done
|
||||
${INSTALL_DIR} ${PFX}/share/doc/radare2
|
||||
for a in doc/* ; do ${INSTALL_DATA} $$a ${PFX}/share/doc/radare2 ; done
|
||||
|
||||
install-doc-symlink:
|
||||
${INSTALL_DIR} ${DESTDIR}${PREFIX}/share/doc/radare2
|
||||
cd doc ; for a in * ; do ln -fs `pwd`/$$a ${DESTDIR}/${PREFIX}/share/doc/radare2 ; done
|
||||
${INSTALL_DIR} ${PFX}/share/doc/radare2
|
||||
cd doc ; for a in * ; do ln -fs `pwd`/$$a ${PFX}/share/doc/radare2 ; done
|
||||
|
||||
install: install-doc install-man
|
||||
cd libr && ${MAKE} install PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
||||
|
@ -75,7 +75,7 @@ install: install-doc install-man
|
|||
|
||||
install-pkgconfig-symlink:
|
||||
@${INSTALL_DIR} ${PFX}/lib/pkgconfig
|
||||
cd pkgcfg ; for a in *.pc ; do ln -fs $${PWD}/$$a ${DESTDIR}/${PREFIX}/lib/pkgconfig/$$a ; done
|
||||
cd pkgcfg ; for a in *.pc ; do ln -fs $${PWD}/$$a ${PFX}/lib/pkgconfig/$$a ; done
|
||||
|
||||
symstall install-symlink: install-man-symlink install-doc-symlink install-pkgconfig-symlink
|
||||
cd libr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
||||
|
|
|
@ -17,6 +17,8 @@ PREFIX=${PWD}/prefix
|
|||
VERSION=`date '+%Y%m%d'`
|
||||
endif
|
||||
|
||||
PFX=${DESTDIR}${PREFIX}
|
||||
|
||||
LIBDIR=${PREFIX}/lib
|
||||
|
||||
-include config-user.mk
|
||||
|
|
|
@ -1894,6 +1894,12 @@ static int cmd_print(void *data, const char *input) {
|
|||
}
|
||||
} else l = len;
|
||||
|
||||
i = r_config_get_i (core->config, "cfg.maxbsize");
|
||||
if (i && l > i) {
|
||||
eprintf ("This block size is too big. Did you mean 'p%c @ %s' instead?\n",
|
||||
*input, input+2);
|
||||
return R_FALSE;
|
||||
}
|
||||
switch (input[0]) {
|
||||
case '%':
|
||||
{
|
||||
|
|
|
@ -349,6 +349,7 @@ R_API int r_core_config_init(RCore *core) {
|
|||
r_config_set_cb (cfg, "cfg.debug", "false", &config_cfgdebug_callback);
|
||||
r_config_set_cb (cfg, "cfg.datefmt", "%d:%m:%Y %H:%M:%S %z", &config_cfgdatefmt_callback);
|
||||
r_config_set (cfg, "cfg.fortunes", "true");
|
||||
r_config_set_i (cfg, "cfg.maxbsize", 524288);
|
||||
r_config_set (cfg, "dbg.backend", "native");
|
||||
r_config_set (cfg, "dbg.bep", "loader"); // loader, entry, constructor, main
|
||||
r_config_set_cb (cfg, "dbg.stopthreads", "true", &config_stopthreads_callback);
|
||||
|
|
Loading…
Reference in New Issue