help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining string results from http calls


From: Andrei Borzenkov
Subject: Re: Obtaining string results from http calls
Date: Sat, 27 Sep 2014 09:22:44 +0400

В Fri, 26 Sep 2014 15:30:46 -0600
Joseph Kelly <address@hidden> пишет:

> Hello,
> 
> Can someone point me in a direction for correct usage of the HTTP module to
> help in returning strings? Is there any documentation for this online?
> 
> I am using source code for Grub 2.02~beta2
> 
> I am attempting to return the results of an http query.
> 
> My code compiles and executes the commands without error, but I think I'm
> having difficulty understanding where the pointers go during the
> abstraction and what the pointers have when the top level commands finish.
> 
> Here is a sample of what I am attempting to do.
> 
> 
> struct grub_file *gf;
> err = grub_http_protocol.open(gf, httpquery);

That's not how it is designed to work. http module in grub exists to
implement file abstraction - you never call it directly from anywhere.
Just do "cat (http,1.2.3.4)/path/to/file". Or grub_file_open(),
grub_file_read() if you do it in C code.

> grub_printf("DEBUG: current_line:
> %s\n",((http_data_t)(gf->data))->current_line);
> 
> This code just results in a "(null)".
> 
> Any help here would be useful.
> 
> 
> 
> Joseph Kelly




reply via email to

[Prev in Thread] Current Thread [Next in Thread]