Symbolic Link

No, it's explicitly by design and common across many programming languages. Take the following example from C

Code:
If (val && strlen(val))

That's something you'll see in pretty much every C program. Calling strlen with a null argument would crash the program. The fact that the strlen call is not done if val is false is absolutely essential.
That's where I think people who are submerged in any particular sphere lose sight of how things look from outside that sphere. Yes, it may well be "standard" amongst programmers, but if you wanted to be explicit it would be (something like)
Code:
If (val != "") then strlen(val) else 0
...which may well compile to the same thing anyway.

If (val && strlen(val)) only makes sense if you know that the particular target language assumes an undefined variable evaluates to FALSE when pulled into a logical condition, that the optimiser prevents evaluation of irrelevant terms, and that it's OK to not have an implied THEN following an IF.

To those familiar with the language, it's as clear as any other construct.
Self-documenting code should be comprehensible even when one is not familiar with the language. One can read code with a lot less knowledge than it takes to write (working) code, but it helps if the intention is explicit and not implied.

This is not meant to start an argument, it's just to point out there are other ways of looking at it.
 
Last edited:
What's the matter here?:

On the HD-FOX, I created /mod/etc/init.d/S99blackhole:
Code:
#!/bin/sh
ln -s "/media/drive1/Video" "/media/My Video"
...and made it executable:
modinit.log may provide a clue here. It should record the execution of your script and any output it generated during boot.
 
That's where I think people who are submerged in any particular sphere lose sight of how things look from outside that sphere. Yes, it may well be "standard" amongst programmers, but if you wanted to be explicit it would be (something like)

I think you've slightly missed my point.

I'm always going to write:
Code:
if (val && strlen(val) == 4 && val == "fred")
{
    then...
}

rather than

Code:
if (val)
{
    if (strlen(val) == 4)
    {
        if (val == "fred")
        {
            then...
        }
    }
}
Short-circuiting logic is a feature of most programming languages and essential in the first form to stop a crash if val is a NULL pointer. It's a simple extension to use that feature in the way that started this discussion however long ago that was. So long that I didn't recognise my own quoted words when cdmackay resurrected it.

This is not meant to start an argument, it's just to point out there are other ways of looking at it.
I wouldn't take it any other way.

btw, it's also recognised technique in C at least to use a single & when you /do/ want both sides of an expression to be evaluated. It's a bit-wise operator but also serves as a non-short-circuiting AND.

That is, assuming that the two functions func1 and func2 return a true or false (1 or 0) then,
Code:
if (func1() & func2())
is logically equivalent to:
Code:
if (func1() && func2())
except that the function 'func2' is always called in the first case and only if func1 returned true in the second. Forgetting the second & can cause difficult to debug problems.
 
modinit.log may provide a clue here. It should record the execution of your script and any output it generated during boot.
No, nothing:
Code:
...
121        Sun Oct 11 16:45:08 UTC 2015 - S98nfs-server (elapsed: 10s)
122        Sun Oct 11 16:45:18 UTC 2015 - S99blackhole (elapsed: 1s)
123    === Sun Oct 11 16:45:19 UTC 2015 - complete ===========================

Not that I think it would help, whatever it said - the link must be in place and working because it's consequences show up in the WebIF media browser as a "My Video" folder directly under /media.

I have just realised that in the HDR-FOX my symbolic links to things like [Unclassified] and Weatherview are under /media along side any USB drives and auto-mounts, but in the HD-FOX, the level immediately below /media is the USB device level and "Video" is still another layer down (inside "drive1"). This likely accounts for the different behaviour.

If a solution can be found I will use it, but the auto-mount is working as I want (how does that manage to create a new entity at the drive level which does get recognised?).
 
Hi all,
I suspect I have a slight issue related to this thread, hence posting here. I regularly extract a listing of my HDR and the USB device by connecting from my Windows PC and using "dir H:*.ts /s/b > Vidlist.txt". I then do a bit of jiggery pokery on that output file to produce a useful list of films, music etc.
All of a sudden, and I think it's since installing TVDB and Sweeper, I've got a load of untitled directories - I believe (I'm not great with Linux) these are the symlinks you're referring to here. My listing the other day got up to 361,000 lines and then blew up, and it was only when i had a look i realised it's listing the same files again and again - leading me to this thread.
I've uninstalled sweeper but the "directories" remain. Do you know of a way to tidy these up and go back to just the list of files and directories that really exist? Or maybe I'm barking up the wrong tree.....but any help much appreciated.

Thanks, John
 
Is there any possibility you have network-shared a file system that contains an existing network share, and thus set up an infinite regression?
 
Hello there, thanks for your prompt reply.

I don't think i have, but I'll mull on that....I can't think of anything I might have done recently along those lines. Out of interest, it's always a set number of "odd" (not very technical i know) directories, i've uploaded a little screenshot of how it appears from Windows.

Over the weekend I'll try to ssh in and see what it looks like natively.

Thanks again, John.
 

Attachments

  • Humax_Odd_Dir.jpg
    Humax_Odd_Dir.jpg
    39.5 KB · Views: 12
Hi again,

I got an opportunity to do a bit more digging this morning. If I telnet into the box or ftp from Windows Explorer then the folder structure looks fine.

This lead me to think that the method of connecting that is demonstrating a problem is using Samba. I therefore uninstalled the Samba package and then reinstalled it.

Uninstalling looks like it goes ok:
Removing package samba from root...
Not deleting modified conffile /mod/etc/secrets.tdb.

Done.​

But reinstalling catches the following error:

>>> opkg install samba
Installing samba (2.2.12-6) to root...
Downloading hpkg.tv/ hdrfoxt2/ base/ samba_2.2.12-6_mipsel.opk.
Configuring samba.
Collected errors:
* resolve_conffiles: Existing conffile /mod/etc/secrets.tdb is different from the conffile in the new package. The new conffile will be placed at /mod/etc/secrets.tdb-opkg.

Done.​

I looked up that error and found a thread suggesting the Samba password had been changed - I've certainly not done that knowingly or intentionally.

I'm putting lots in here as I don't get the opportunity to post too often, so the last thing I've just discovered that is maybe a bit odd is that ftp'ing using WS_FTP doesn't show any media at all, though it seems to connect ok (picture attached).

Any clues in here for something i could try? I'm leaning toward an issue with the Samba configuration.

Many thanks for any suggestions.
 

Attachments

  • Humax_Odd_Dir2.jpg
    Humax_Odd_Dir2.jpg
    33.5 KB · Views: 8
Well, an interesting set of results.....

No, I hadn't hand edited secrets (.tdb presumably?), so I renamed it and reinstalled Samba successfully - however, same results. I then realised my hypothesis was probably wrong anyway because the explorer view from Windows of the external usb was fine, only the internal drive folder structure is peculiar. So it looks more like there's something in my file system on the Humax that Samba doesn't like (maybe?).

Anyway the good news was that whilst fiddling around I discovered find / -type f -name "*.ts" >List.txt, which produces exactly what I want*, so I think we can consign this to history.

Definitely off-thread, so I might not get away with this, where is the synopsis information held and is it accessible? Is there a thread on that (I can't find one). My next little project will be to produce the listing alongside the synopsis.

Thank you for your help, John.

* From my windows machine, I opened explorer and did a search (in one directory) for my "List.txt" when i thought i'd misplaced it, and the search results got to 604 entries for the exact same file, and showed no signs of completing. Something is definitely not right!
 
Is "Shopping Link Added by SkimWords" something your client added to your post (on "external usb"), or is this some hideous server side thing @Michael ?

Screenshot at 2016-04-18 19:33:39.png
Got rid of it with ABP now...
 
Last edited:
If not from you, I can't imagine where else it could have come from - we've not seen any others creep in (unlike certain forums I could mention). Testing:

Humax FVP-4000T
external usb
HDMI port adapter

On the other hand, there has to be some kind of server support for the link because there is nothing embedded in the actual post itself (try quoting it), and a normal embedded link in a post would not have a hover tip.

What's going on? I'll start a topic in Forum Issues.
 
Definitely off-thread, so I might not get away with this, where is the synopsis information held and is it accessible? Is there a thread on that (I can't find one). My next little project will be to produce the listing alongside the synopsis.
The synopsis text is in the .hmt file. You can look at it and edit it with the WebIF media browser, or with the hmt command line utility.
 
Back
Top