search for: print_string

Displaying 20 results from an estimated 47 matches for "print_string".

Did you mean: print_strings
2009 Aug 17
1
two more warning-avoidance patches
...f9a78034249f37861e00e474018b8f750df2 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Mon, 17 Aug 2009 18:47:46 +0200 Subject: [PATCH libguestfs 2/2] generator.ml: avoid warnings in generated tests.c * src/generator.ml: Avoid warnings in generated tests.c, regarding print_strings, and in exercising any function that takes a StringList or DeviceList parameter. (print_strings): Change param type to "char *const *s". Declare fully-const initializer for each list-taking function use. Cast *List argument to "(char **)". --- src/generator.ml | 8 ++++----...
2003 Dec 04
2
[LLVMdev] A couple questions
Question 1: I am trying to get a function not to be inlined. What are llvm's rules pertaining to inlining? I have tried all of the standard gcc options for turning off inlining and they do not seem to work. Here is the sample code that I am working with: #include <stdio.h> void print_string(char* strval); int main() { char* strval = "Hello world\n"; while(1){ print_string(strval); sleep(15); } return 0; } void print_string(char* strval) { int i; for(i=0;i<12;i++){ putc(strval[i], stdout); } } gcc 3.2.2 does not inline this by default. Also, on llvm.cs.u...
2017 Mar 21
0
Patch: make slightly more verbose versions of isohdp.x.S
...sohdpfx.S" + diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S index 17e1efe..6d8ab36 100644 --- a/mbr/isohdpfx.S +++ b/mbr/isohdpfx.S @@ -121,10 +121,24 @@ _start: /* We have GPT partition information */ movl (32+20)(%si), %ecx movl (36+20)(%si), %ebx + +#ifdef DEBUG_PRINT + push %si + call print_string + .ascii "G\r\n" + pop %si +#endif jmp 1f /* We have non-GPT partition information */ 2: +#ifdef DEBUG_PRINT + push %si + call print_string + .ascii "M\r\n" + pop %si +#endif + movl 8(%si), %ecx #endif 1: @@ -167,14 +181,34 @@ next: read_sector_cbios: movb $0x42,...
2017 Mar 21
3
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
..., 4(%si) /* Partition type zero == invalid? */ je 1f cmpl $0x58504721, %eax /* !GPT signature in EAX? */ jne 2f cmpb $0xed, 4(%si) /* EFI partition type? */ jne 2f /* We have GPT partition information */ movl (32+20)(%si), %ecx movl (36+20)(%si), %ebx #ifdef DEBUG_PRINT push %si call print_string .ascii "G\r\n" pop %si #endif jmp 1f /* We have non-GPT partition information */ 2: #ifdef DEBUG_PRINT push %si call print_string .ascii "M\r\n" pop %si #endif movl 8(%si), %ecx #endif 1: /* We have no partition information */ pushl %ebx /* -4: partoffset_hi */...
2016 Aug 19
1
[PATCH] virt-rescue rewrite in OCaml
Hi, I tried to rewrite virt-rescue from C to OCaml. Goals were feature parity with C implementation, smaller codebase and hopefully better maintainability. I still don't know if I've covered everything right. So, please check it out. PS: my git send-email seems to be broken, so I'm sending it from thunderbird Thanks! maros
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2013 Apr 03
14
ocaml bindings
i''m the Mageia Xen package maintainer, and a user reported that i had missing symbols in my ocaml bindings: https://bugs.mageia.org/show_bug.cgi?id=5199 i''m using Xen 4.2.1 and ocaml 3.12.1 the problem is that if you just to a simple hello world and you''re using certain bindings (eg: xeneventch): you get missing symbols. (others appear to be fine). I know next to
2016 Aug 03
0
[PATCH] dib: rework run of extra-data.d hooks (RHBZ#1362354)
...t run () = - run_command cmd in - let delta_t = timed_run run in - if debug >= 1 then ( - printf "\n"; - printf "%s completed after %.3f s\n" x delta_t - ); - Hashtbl.add timings x delta_t; - ) scripts; - if debug >= 1 then ( - print_string (timing_output ~target_name:hook_name scripts timings) + let mount_dir = base_mount_dir // hook_name in + do_mkdir mount_dir; + + let rec fork_and_run () = + let pid = Unix.fork () in + if pid = 0 then ( (* child *) + let retcode = run_scripts () in + flush_all (); + let cmd...
2015 Nov 10
7
[PATCH 0/4]: mllib: Add 'may' function, and refactoring.
The 'may' function is a higher-order function (HOF) that replaces: match x with | None -> () | Some x -> f x with: may f x The idea comes from lablgtk (OCaml Gtk bindings) where it is widely used. If this change is clearer than previous code, then this could be used in many more places. However I previously steered clear from using HOFs like this because they can be
2013 Dec 20
0
[LLVMdev] A problem about convert a string to a *i8 pointer
Hello! Nearly, I write a pass to add an call "printf" instructions before every instruction in a .bc file,which prints the opcode of every instruction before the instruction executed. While passing the opcode to the printf fucntion ,I used such way to convert the string to i8* (the same as http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-September/053206.html does): StringRef s =
2017 Mar 21
0
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...L. The combination will be: 432 bytes from Martin's MBR 80 bytes from the Debian ISO with isolinux block address 647 MiB from my block producer -------------------------------------------------------------------- Looking at the assembler code: What's the meaning of call print_string .ascii "Key?\r\n" How large is the binary currently ? Would there be room to print the (Cylinder, Head, Sector) address in case of CBIOS ? Have a nice day :) Thomas
2016 Aug 03
3
[PATCH] mllib: move _exit from v2v as Exit module
Move the OCaml binding to C _exit to an own module. Just code motion, adapting v2v in the process. --- docs/C_SOURCE_FILES | 2 +- mllib/Makefile.am | 5 ++++- mllib/exit-c.c | 33 +++++++++++++++++++++++++++++++++ mllib/exit.ml | 19 +++++++++++++++++++ mllib/exit.mli | 20 ++++++++++++++++++++ v2v/Makefile.am | 1 - v2v/changeuid-c.c | 33
2019 Jan 16
0
[PATCH 4/5] mltools: curl: turn Curl.run to raise exceptions
...l | 9 ++++++++- v2v/v2v.ml | 9 ++++++++- 5 files changed, 41 insertions(+), 4 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index c7cbcaedb..651db83f0 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -791,4 +791,11 @@ let main () = Option.may print_string stats -let () = run_main_and_handle_errors main +let () = + let main_wrap () = + try main () + with + | Curl.Curl_failed (code, url) -> + error (f_"curl error: failed to download ‘%s’, error code %d") url code + in + run_main_and_handle_errors main_wrap diff --git a/...
2010 Jun 01
1
[PATCH] fish: help command return error for non-existent commands (RHBZ#597145).
...e, const char *shortdesc, const char *body); extern void list_builtin_commands (void); -extern void display_builtin_command (const char *cmd); +extern int display_builtin_command (const char *cmd); extern void free_strings (char **argv); extern int count_strings (char *const *argv); extern void print_strings (char *const *argv); @@ -71,7 +71,7 @@ extern void extended_help_message (void); /* in cmds.c (auto-generated) */ extern void list_commands (void); -extern void display_command (const char *cmd); +extern int display_command (const char *cmd); extern int run_action (const char *cmd, int argc,...
2017 Oct 08
0
[PATCH v2 3/4] common/mlstdutils: Introduce Option submodule.
...g#set_memsize cmdline.memsize; + Option.may g#set_smp cmdline.smp; g#set_network cmdline.network; (* The output disk is being created, so use cache=unsafe here. *) @@ -781,6 +781,6 @@ let main () = Pervasives.flush Pervasives.stdout; Pervasives.flush Pervasives.stderr; - may print_string stats + Option.may print_string stats let () = run_main_and_handle_errors main diff --git a/builder/index.ml b/builder/index.ml index b895e3f52..84f66c265 100644 --- a/builder/index.ml +++ b/builder/index.ml @@ -53,34 +53,29 @@ let print_entry chan (name, { printable_name; file_uri; arch; osinf...
2012 Jan 20
11
[PATCH 01/10] Revert "Revert "generator: Add CamelName flag""
This reverts commit 3f6ca541c7b24d4c86688a509582cb41a7e0078c. The original commit was reverted prematurely. --- generator/generator_actions.ml | 10 +++++----- generator/generator_checks.ml | 5 +++++ generator/generator_types.ml | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index
2011 Jun 11
0
[LLVMdev] Kaleidoscope Build Error
...stion on. I've got a very simple main > program: > > let load_bc ctx path = >   Llvm_bitreader.parse_bitcode ctx (Llvm.MemoryBuffer.of_file path) > > let main () = >   let ctx = Llvm.create_context () in >   let m = load_bc ctx "examples/nweb/nweb.bc" in >   print_string "loaded module successfully" > > and I'm trying to build it using this command (it's in a shell script to the > variable declaration is actually working): > > D=/homes/malecha/tmp/llvm/lib > /usr/bin/ocamlc -I ${D}/ocaml -cclib -lllvm -cclib -lllvm_bitwriter >...
2014 Oct 10
0
[PATCH 3/3] builder: use the JSON module
...:: item in + let item = ("hidden", JSON.Bool hidden) :: item in + JSON.Dict (List.rev item) + ) index in + let doc = [ + "version", JSON.Int 1; + "sources", JSON.List json_sources; + "templates", JSON.List json_templates; + ] in + print_string (JSON.string_of_doc ~fmt:JSON.Indented doc); + print_newline () diff --git a/builder/test-virt-builder-list.sh b/builder/test-virt-builder-list.sh index 49daae7..2b6dfad 100755 --- a/builder/test-virt-builder-list.sh +++ b/builder/test-virt-builder-list.sh @@ -116,81 +116,81 @@ json_list=$(virt-bu...
2017 Mar 22
3
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...from Martin's MBR > 80 bytes from the Debian ISO with isolinux block address > 647 MiB from my block producer > > -------------------------------------------------------------------- > Looking at the assembler code: > > What's the meaning of > call print_string > .ascii "Key?\r\n" It's waiting for a key because the debian iso displays some graphics stuff so you won't have time to see any of the debug printing. > How large is the binary currently ? > Would there be room to print the (Cylinder, Head, Sector) address in...
2012 Oct 04
8
[PATCH][BTRFS-PROGS][V3] btrfs filesystem df
Hi Chris, this serie of patches updated the command "btrfs filesystem df". I update this command because it is not so easy to get the information about the disk usage from the command "fi df" and "fi show". This patch was the result of some discussions on the btrfs mailing list. Many thanks to all the contributors. From the man page (see 2nd patch): [...] The