Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #27598

Re: Simple filesystem for embedded platform

From Stefan Reuther <stefan.news@arcor.de>
Newsgroups comp.arch.embedded
Subject Re: Simple filesystem for embedded platform
Date 2018-02-02 19:08 +0100
Message-ID <p52cvr.4no.1@stefan.msgid.phost.de> (permalink)
References <p4ujob$6gf$1@dont-email.me> <p4ukvj$dp6$1@dont-email.me> <p4us76$r44$1@dont-email.me> <p4ut7c$22j$1@dont-email.me> <p51l63$apk$1@dont-email.me>

Show all headers | View raw


Am 02.02.2018 um 13:22 schrieb pozz:
> Il 01/02/2018 12:21, David Brown ha scritto:
>> First ask yourself, /do/ you need to search for this URI in a list?  An
>> embedded web server will often have just one web page - it might not
>> even have any other files or URI's at all.  Then you don't need to parse
>> the incoming URI in any way - you return the same "file" each time.  For
>> the web server in an application I have, I have 4 files - index.html,
>> favicon.ico, 404.html, and a jquery.js file.  The searching can be done
>> be a set of "if (strcmp....)" checks that are fixed in the code.  (My
>> server is a little bit beyond that, but not much.)
>>
>> You are not trying to re-create Apache here - there is no need to make
>> things more complex than they have to be for the task in hand.  I don't
>> know what features you need here, and whether such a method for
>> "searching" is enough - but it is possible.
> 
> My static web files will be around 20.  However I got your point:
> auto-generate a hardcoded file-list made by a sequence of !strcmp().  I
> think it would be ok.

You can even let your generator generate the strcmp sequence.

I would probably go for some sort of

     struct {
        uint32_t start;
        uint32_t size;
        char name[24];
     };

and let my generator build an array of that. Last time I did that, I
stored the structs in the flash as well, to get independence between the
program and data images.


  Stefan

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Simple filesystem for embedded platform pozz <pozzugno@gmail.com> - 2018-02-01 09:39 +0100
  Re: Simple filesystem for embedded platform David Brown <david.brown@hesbynett.no> - 2018-02-01 10:00 +0100
    Re: Simple filesystem for embedded platform pozz <pozzugno@gmail.com> - 2018-02-01 12:04 +0100
      Re: Simple filesystem for embedded platform David Brown <david.brown@hesbynett.no> - 2018-02-01 12:21 +0100
        Re: Simple filesystem for embedded platform pozz <pozzugno@gmail.com> - 2018-02-02 13:22 +0100
          Re: Simple filesystem for embedded platform David Brown <david.brown@hesbynett.no> - 2018-02-02 14:43 +0100
          Re: Simple filesystem for embedded platform Stefan Reuther <stefan.news@arcor.de> - 2018-02-02 19:08 +0100
  Re: Simple filesystem for embedded platform pippo2@disney.com (Jack) - 2018-02-01 21:58 +0100
    Re: Simple filesystem for embedded platform Dave Nadler <drn@nadler.com> - 2018-02-01 18:18 -0800
  Re: Simple filesystem for embedded platform Joe Chisolm <jchisolm6@earthlink.net> - 2018-02-01 17:25 -0600

csiph-web