Jeff Epler's blog

26 July 2016, 16:23 UTC

Star Trek: Beyond as a 4-episode mini arc

Warning: Spoilers for the recently-released Star Trek: Beyond movie

S3E9: Toxic Humanity

Cold open: Same as in ST:B.

One of the Teenax who attacks Kirk becomes ill after the attack, because human blood is toxic to Teenax. McCoy places Teenax (all the Teenax are called Teenax; they insist that as they speak it, each name is distinct) in stasis but cannot cure it. However, the Fabona (who look like 9' tall sunflower plants) offer a second artifact with healing powers. This time, the Teenax choose to overlook the fact that the artifact may be "stolen" in order to save the life of their countryman.

B plot: Scotty plays a practical joke on Keenser, but its race is unfamiliar with the concept. Keenser takes it in stride, but an attempt to reciprocate the practical joke goes awry.

B2 plot: Kirk's upcoming birthday; subspace communication with Commodore Paris about promotion to a desk job.

S3E10: Starbase Boondoggle

Main plot: Commander Spock learns of the death of Admiral Spock. Nyota prepares Plomeek soup for him, but the gesture enrages Spock who loses control of his emotions for a moment. Nyota forgives him, but Spock decides that he must end his romantic relationship with her and rededicate himself to Vulcan cultural principles and the creation of a New Vulcan. She offers to return the necklace, but he refuses it.

B plot: Billed as the Federation's largest engineering effort to date, Yorktown Station is not all it is hyped to be. Problems range from wonky comms to broken replicators. "At least the gravity stayed on this time!" quips Sulu's partner (whose name we actually learn) when the lights fail during a romantic dinner.

S3E11: Altamid Part 1

More or less follows the movie from Kalara's arrival at Yorktown Station to Krall's "Cut her throat" or maybe the saucer section impact depending on pacing. Makes clear a couple of things in my headcanon, the foremost being that Enterprise only recalled a partial crew for the mission, since it was to be of short duration.

S3E12: Altamid Part 2

More or less follows the movie until Krall's attempted deployment of the bioweapon in Yorktown. Commander Finnegan, who has been dealing with its broken systems for months, knows how to shut down the supposedly failsafe life support system: just change the settings to specify earth-standard atmosphere (21%), instead of the current oxygen-rich (28%) mixture. Krall, trapped in the circulation chamber, commits suicide by alien bioweapon rather than receive Federation "therapy".

As we watch the time-lapse construction of NCC-1701-1, voice overs:

Kirk: That ship is beautiful. Too bad I'll never fly her.
Paris: She's is yours if you want her. Perhaps your promotion was just a glitch in the Yorktown's computers

Spock: [stilted language that he was "illogical" to dump Nyota]
Nyota: If that's an apology, I accept.

Here ends season 3


23 June 2016, 11:50 UTC

Installing and testing jessie-backports realtime kernels from debian archive


Kernel 4.1, 4.4, and 4.6 all give similar latency on my i7-4790k system running in 64-bit mode, at least for short (<10 minute) tests.

How to use backports

Or, rather, how *I* used backports..

First, find the kernels (or other packages) in the search interface at In the case of jessie-backports, look for versions that say ".bpo" or ".bpo8".

I found 3 realtime kernels that seemed interesting, based on 4.1, 4.4, and 4.6, so I came up with these lines for a file in /etc/apt/sources.list.d:

# Kernel 4.1
deb jessie-backports main
deb-src jessie-backports main

# Kernel 4.4
deb jessie-backports main
deb-src jessie-backports main

# Kernel 4.6
deb jessie-backports main
deb-src jessie-backports main

Then, update without checking whether the packages are out of date:

sudo apt-get  -o Acquire::Check-Valid-Until=false  update

and request that the packages get installed, e.g., for 4.6:

sudo apt-get install -t jessie-backports  linux-image-4.6.0-0.bpo.1-rt-amd64 linux-headers-4.6.0-0.bpo.1-rt-amd64

(you can omit -headers if you don't use any nonstandard kernel modules)

Now you have to remove or comment out the backports lines, because otherwise subsequent apt-get updates without special flags will (rightfully) error right out:

E: Release file for is expired (invalid since 279d 3h 56min 3s). Updates for this repository will not be applied.
It looks like everything installed, so now to reboot and try my new kernels...

Latency results

Kernel 4.1 (4.1.0-0.bpo.2-rt-amd64)

nvidia X driver failed to automatically load. This may affect (improve) realtime results.

linuxcnc latency-histogram --nobase: 11.5us max latency in 3 minutes

Kernel 4.4 (4.4.0-trunk-rt-amd64)

(I believe this kernel is self-built and so may differ slightly from the one on bpo)

nvidia X driver loaded. This may harm realtime results.

linuxcnc latency-histogram --nobase: 135.2us max latency in 2 minutes

(this is perfectly adquate latency for mesa hardware, by the way!)

Kernel 4.6 (4.6.0-0.bpo.1-rt-amd64)

nvidia X driver loaded. This may harm realtime results.

linuxcnc latency-histogram --nobase: 126us max latency in 11 hours

nvidia kernel driver temporarily blacklisted.

linuxcnc latency-histogram --nobase: 9.4us max latency in 2 minutes

(note to self: why does the size and layout of the latency window change when my desktop resolution changes?)


18 June 2016, 17:13 UTC

Saturday Software Project: VIC 20 Incremental Game

First game I've written in ages, the first incremental game I've written, and it also runs on the 1980 VIC 20:

License: GPLv2+


11 June 2016, 1:04 UTC

linuxcnc: Getting to the compile errors on freebsd

A potential new contributor dropped by on IRC asking about a problem on FreeBSD. My interest was piqued since we don't support freebsd. I hope he will start getting us some patches soon! (update, 2016-06-15: Many, many patches. So many patches.)

Anyway, I was interested enough to spin up a FreeBSD (10.2) instance and get it to the point where I could work on configure and compile errors. These are my very terse notes:

sudo pkg install git python \
    tk86 blt tclx bwidget \
    autoconf readline pkgconf \
    boost-all gcc5 pidof gettext py27-tkinter \
    boost-python-libs \
    libGL libGLU libXmu gmake

./configure --with-realtime=uspace CC=gcc5 CXX=g++5 --without-libmodbus --disable-gtk --disable-check-runtime-deps --enable-non-distributable=yes
however in an evening's work I'm still well short of getting the software to build. One thing I ran into is that clock_nanosleep, something we use thousands of times a second, isn't available on FreeBSD, despite being in POSIX 2008.1!

(and just like their branch, mine is way too green to be ready to share with anyone)


9 June 2016, 15:43 UTC

Capital Laundry Services document leak

These are actually my (ineligible, due to being an American) entries for Charlie's pre-book-release contest. Go read the others there! I re-collect them here so I can do a bit more copyediting. Then I started adding more because I felt like I was threadsitting on Charlie's blog.



Structure and Interpretation of Esoteric Programs


Introductory textbook for computational sorcery (Black Chamber)


Related to the well-known "Structure and Interpretation of Computer Programs" (SICP), this introductory textbook is used by the Black Chamber for initial training of inductees into their Esoteric Software development group. Aside from the distinctive cover, it can easily be recognized by its cold and clammy cover and pages, no matter the ambient conditions.

More accessible than the suppressed Art of Computer Programming (volume 5), it generally begins by drawing parallels between the lambda calculus, generative L-systems, and dho-na curves. Subsequent chapters illustrate topics such as algorithmic summoning; the impossibility of dho-na software with immutable state; 3D-printing of esoteric artifacts; and (befitting the Black Chamber's origins) efficient integer factoring algorithms.

Higher order software of the kind described in SIEP is always executing, even when apparently fixed as data in a tangible medium like a book. This has several interesting consequences: the "cold and clammy" feeling when the book is handled, the fact that each individual book is slightly different in content, organization and layout (except, apparently, for the wizard on the cover and the integer factoring algorithm), and the actual impossibility of an e-book version (in that medium, its content rapidly evolves into a second fixed form, a self-published science fiction novel). This last factor, luckily, has limited the availability of the book; we believe that fewer than 25 copies presently exist, most of them in the Chamber's Nevada training and containment facility.

While no one can deny the effectiveness of the Black Chamber's software development program, and the comparatively long productive life of its programmers, the programming style taught in SIEP is correlated with an early-onset variant Krantzberg Syndrome characterized by retreat from normal social interactions, casual misogyny, and a preference for idealized fantasy worlds.

Additionally, the integer factoring algorithm is so vigoriously endothermic that executing it on a 40-digit number in a populated area would lead to mass casualties.


While the Chamber may tolerate this fate of its programmers (in the intial statges, this K-syndrome variant appears to actually increase their productivity), The Laundry does not. Any agent coming in contact with SIEP is instructed not to read it; or if she has read it to report the incident and refrain from using any methods learned from it. (Predictive department adds: Agent M—, this means you) In either case, the volume shall be turned in to your operations officer for secure destruction or as leverage in negotiations with the Black Chamber.



Accelerated Learning Refreshment Device


This device consists of a sheet-fed scanner connected to a standard commercial-grade espresso machine. A dedicated neural network ASIC processes the scanned materials and heats the steam. This process produces a beverage which in turn creates a Billington-type geas, causing the person who consumes the drink to conform to the archetype presented in the scanned materials. The geas drops in strength as the caffeine in the beverage is metabolized, with a half-life of about 5.7 hours in healthy adult humans.

For instructive materials, the result is initial intense interest in the subject; if this impulse is not resisted, one day of self-instruction with 3 to 5 shots of espresso can give long-lasting proficiency equivalent to a semester of classroom instruction or 80 hours of practical experience.

Use with fictional materials is forbidden by Laundry policy. Further discussion of the consequences of such use are coded CHEKHOVS CUPPA.


Subject I— was a barista and doctorate candidate in english literature who exhibited an unconscious sigma-3 superpower that caused coffee shop patrons to spontaneously act out scenes from whatever book Subject I— had most recently been reading. Laundry agents detected and neutralized him, but not before several civilians, each believing themselves to be Ophelia, suffocated with lungs inexplicably full of water. (The Hamlets, Laerteses, and so forth were saved from their fate by the Laundry's timely intervention. Curiously, no Poloniouses had lost detectable amounts of blood) The neural network structure of CAFFEINATED BOOKWORM was reverse engineered based on cellular-level scans of Subject I—'s cerebral cortex, and use with instructional materials was found to be safe.



Anti-exonome autoijnector


This single-use injector, physically similar to the commercial EpiPen™, can be used by trained and untrained individuals in the event of exonome (demonic) possession. If used within the first 5 minutes after exposure, the survival rate is over 90% for possession by entities level 2 or lower, and over 75% for level 3 entities.

The Exo-Pen payload consists of artificial blood platelets inscribed with nanoscale banishment circuits, plus epinephrine to reduce the incidence of fatal cardiac arrest caused by the departing demon.


Pursuant to PROTOCOL NIGHTMARE GREEN, the Exo-Pen shall be an element of the standard gear ("every day carry") for all Laundry staff regardless of official field clearance status during the continuing emergency. Use of banishment rounds to the hand or foot as a first response to apparent possession is now grounds for disciplinary action.



Proposed CNG response strategy


While many CASE NIGHTMARE GREEN response strategies have focused on reactive defense (c.f. SCORPION STARE, EMOCUM, WALL PHASE PURPLE), SURPRISE SYMBOL WELCOME (like NO CHILD LEFT according to the leaked Black Chamber document) emphasizes removing the bulk civilian population from the area of conflict. Unlike NO CHILD LEFT, net civilian casualties in urban areas are estimated at under 1%.

In the aftermath of OGRE REALITY, Laundry estimates of the amount of power needed to open a Class 6 (city-sized) interdimensional gate were decreased by 5 orders of magnitude. This was later confirmed when satellite photos taken after the "failed" 2009 North Korean nuclear test indicated that a 25km2 area was cleared to a depth of over 100m (more at JUCHE BEACHHEAD).

SURPRISE SYMBOL consists of three phases: First, small advance parties passing through Class 3 gates scout accessible dimensions to locate survivable ones with no sapient inhabitants and abundant local edibles. Concurrently, thermonuclear devices in the 50kT range are pre-installed in all major city centers. Finally, at the onset of NIGHTMARE DAWN the devices are detonated.

Each bomb sits within an inactive summoning grid. Detonation begins the process of grid activation, and the explosion wavefront projects the grid outward on its surface.

Initially, the wavefront acts like a normal thermonuclear explosion, killing people in its path with a combination of blast force and thermal energy. The thaumic energy of these wrongly-killed souls is gathered onto the summoning grid.

When a particular ratio of physical energy to thaumic energy is attained within the grid, it fires and opens an ellipsoidal gate centered on the origin of the explosion. Thus the placement of the bomb at a city center is required for two reasons: first, because this determines the gate placement; and second so that the number of ground zero casualties can be large enough within a small radius to open an appropriately-sized gate.

Opening the gate consumes substantially all initial energy from the explosion, leaving mostly residual radiation (fallout).

Each city transported in this manner will now lie in its own low-sapience region; even the approximate 14 million inhabitants of London's metropolitan area are too small to attract the worst of the horrors, which will prefer alternate earths where the full complement of 3-14 billion sophonts.

Depending on the the habitability of the primary Earth in the aftermath of CNG, city leaders are be directed to follow PROTOCOL NO SUNSET or PROTOCOL ONE-NIL.


Laundry personnel shall liase with local authorities and follow all applicable laws and regulations when choosing appropriate sites for SURPRISE SYMBOL gates. Site selection critieria include but are not limited to

  • not near critical infrastructure
  • low economic impact resulting from destroyed infrastructure and civilian collateral damage
  • official activities in area provide plausible cover for 24/7 site guard
  • prevailing winds avoid sensitive ecologicial sites
  • steady population 24/7 for optimum gate size control
  • near geographic centers of population to decrease total number of gates required for target 99% population coverage
Where possible, Her Majesty's Prisons of Class A and B are preferred. Secondary preference is given to economically low-performing neighborhoods with no current redevelopment plans.


Implementation phase. Current coverage: 85% by population.



Alleged Black Chamber CNG contingency plan


████ ██ ███████ NO CHILD LEFT ████ ████████ ██████ ████████ ██ ███ ██ ███ ("STEM") █████████ ████ █████████ ███████████. ███ ████████ public school programs ███████ ██ █████ ███ ██████ ██████ ███ █████ ██ ███ ██ ██ █████ ███████ █ ███████████ ████████ self esteem, while in homeschooling programs, ███ █████ ███████ ███ ████████ ███████ ██ ███ ███████████ █████████ ██ serves to sensitize under-19s. This will enable ███ █████ ███████ ███ ████████ ███████ ██ ███ ███████████ █████████ ██ preferentially chosen as vessels by ███████ ███ ███████████. It is our opinion that █████████ ███████ ████████████ ████ ███████ ███ ████████ ██ █████ ███████ ██ █████, and HPV vaccine are effective ███████ █████████ ████████████ ██████████ ██ ████████. Individual ownership of firearms ████ ███████████ ████ █████████ ████ response protocol with 85% effectiveness before the beginning of state and federal armed response ███████████ ███████ ███████████████ ██████ █████ ████ ████ █████ ███ ████ ███████ █████████ ████████████ ██████████ ██ ████████ ███ █████ ████ ████ ██ ███ ████████ conditioning embedded in Hannibal, NCIS, and Game of Thrones. While the loss of substantially all under-19s will pose a substantial and multi-decade demographic burden post-█████ ██ ██████ ████████████, it is preferable to the alternatives.


Both Mahogany Row and the Predictive Department agree this is not an actual Black Chamber contingency plan; however, they disagree as to whether it is deliberate misinformation by the Chamber, or an attempt by another state-level occult agency to discredit the Chamber as a rogue actor for their own ends.



Field-expedient counterpossession device


This device consists of a standard disposable film camera with flash, centimeter-scale containment grid, and a droplet of blood.

Begin by inscribing a standard containment pentacle on the collimating lens of the camera's flash with any sharp instrument. Activate with a droplet of blood. Take a picture of the zombie or other possessing exonome.

Effective for up to 27 exposures, depending on the camera.


  • Do not attempt to use DAGUERRE WAS WRONG with a digital camera.
  • Do not defeat the camera's automatic advance mechanism to perform additional exposures. Once a frame of film contains an exonome, re-exposing it is dangerous.
  • Do not aim a DAGUERRE WAS WRONG camera at unpossessed humans, animals, or architecture. The process of restoring souls stolen in this fashion is expensive and does not have a high success rate
  • Always safely dispose of the resulting film. Do not under any circumstances develop or print the film.



The damned printer is out of paper again — Bob
No it's not. Just re-send the print job — Brains


Prepare the affinity curve on standard adhesive-backed paper, then stick to the interior of the paper tray. Insert a few sheets of new paper, then install in printer according to manufacturer instructions. After the affinity curve accepts the imprint of the paper, it will find similar paper in similar paper trays and move it to this paper tray when needed.


Symptom: Papers are already marked on one side
Cause: affinity curve has linked to a printer used by a recycling freak
Remedy: Move printer at least 6" in any direction and repeat affinity-linking process.
Caution: Burn the affected paper. Do not under any circumstances read it.

Symptom: Page image cut off on right side or bottom
Cause: affinity curve has linked to a tray with letter paper and you have selected A4, or vice versa.
Remedy: Repeatedly change document margins until you don't care any longer.
Remedy: Move printer at least 6" in any direction and repeat affinity-linking process.

Symptom: Printer is out of ink/toner
Cause: Printer is out of ink/toner
Remedy: Buy ink/toner. To date, no one has disclosed the invention of an affinity curve that works for ink or toner.



Continuous testing infrastructure for Capital Laundry software development, including OFCUT.


Early detection of software defects pays remarkable dividends in the total cost of system development and maintainance. Capital Laundry Services software development branch (re-integrated since the failures at QnetiQ) follows recognized best practices in software development, including MARITIME BLEACHING (the static analysis package for software written in CORAL-07) and PLURAL NORTH PIPE, a continuous integration service.

This service consists of sixteen bunkers on lease from the British Armed Forces. Each bunker has been divided into three suites. Each suite:

  • has been fitted with a tamperproof farady cage
  • is powered by twin diesel generators in redundant configuration
  • contains a fiber optic internet connection to receive testing versions of OFCUT software
  • contains a damned soul (formerly a living Laundry employee), doomed to repeat the events leading up to their deaths (destiny loop), with loop times from 3 minutes to 17 hours, median 18 minutes

Each time a proposed change is submitted to the continuous integration server, the test build is transmitted to 5 suites across at least 3 different bunkers and installed in the suite's OFCUT terminal. Any variation in the details of the ensuing death compared to baseline are summarized and reported, allowing the integration engineer to make an informed decision whether to accept or reject the proposed change.


Do not attempt to make a change to OFCUT that allows the doomed soul to survive its destiny loop. Replacing a soul consumed in this way is expensive, and you may be deemed a volunteer for the position.



Slow-growth-strategy exonome


Originally misidentified as a mundane viral infection, DANUBE is a possessor that exhiibits a low-exponent polynomial growth rate, rather than the exponential/sigmoid growth rate of garden-variety exonomes.

Within a DANUBE infection cluster, the infection of Patient Zero is without apparent cause. Initial symptoms include fever, joint pains, rash, and general fatigue. At this point, DANUBE is diffuse in the patient's whole body, but is not infectious. This phase can last 1 week to 1 month.

In the second phase, DANUBE migrates into the nervous system, specifically into the myelin sheath, and continues to replicate. Here, it begins to manipulate the host body's nervous system. Symptoms include migraines, flashes of mathematical insight, muscle tremors, religious visions, xenoglossy, and minor miracles. This phase can last indefinitely, but generally at least for a year.

In the third phase, DANUBE has reached steady state population in Patient Zero, and the patient enters the infections stage of infestation. The patient begins to articulate a specific vision of community. The vision can be religious or secular; logical or nonsensical; practical or frivolous. It is unclear whether DANUBE merely gives Patient Zero uncommon persuasive power (for instance, by internally modelling a prospective convert's mental states and then molding Patient Zero's behavior), or is able to influence nervous systems remotely. In any case, Patient Zero may amass from a few dozen to a few thousand converts with a short period of time, all of whom will become DANUBE hosts.

In the final phase, DANUBE has become a colony-of-colonies organism. At this point, DANUBE performs large-scale miracles such as extremely low-probability metorological events.

At some point, these miracles cease and DANUBE can no longer be detected in patients' central nervous systems. (In some older and more dubious accounts, Patient Zero themselves disappears when DANUBE does, but that has not been confirmed in any 20th or 21st century cases)

In some cases, after DANUBE departs, the created community is durable on the scale of at least decades; in other cases, the community quickly splinters; in a few unfortunate cases, community members engage in mass suicide.

It is hypothesized that in the late stage, DANUBE gathers enough energy from its hosts to project parts of itself through a huge number of small gates into new hosts, most likely in other dimensions. However, this theory does not seem to be falsifiable, as the required gates are individually too small and low-energy to be detected against background thaumic activity.


7 June 2016, 1:40 UTC

Bye Bye Netflix (blacklisting ipv6)

So after being out of town, I came home and netflix was broken. I was accused of being one of those proxy-using evildoers: "You seem to be using an unblocker or proxy."

I started a support chat and got "Jerry". When I told was using Debian Jessie to watch netflix, I broke his state machine. Eventually, he told me that Linux was not supported.

Meanwhile, I had been googling my own problem and found that netflix has decided they have to break the major free ipv6 tunnel broker, Sure enough, my traceroute was going via ipv6 today. Maybe I could work around it (that thread abounds with bad ideas), but honestly I'll be better off without spending time watching TV for a few months.

At least I asked for and got a refund for my current month of useless service.


19 March 2016, 23:35 UTC

New Desktop 2016

After many years of having an everyday laptop with a headless server, I decided I wanted an everyday desktop computer at home. The parts are on order. By my birthday I hope to have the new system up and running.

read more…

1 March 2016, 2:56 UTC

Literal copying of GPL code into ZFS on Linux

Recently, Canonical has announced that they plan to ship zfsonlinux in compiled form from their "main" repository. They rely on advice from their lawyers that the compiled form of zfs.ko, the kernel loadable module implementing zfs, is not a derivative of the linux kernel. This is important, because if zfsonlinux is a derivative of both GPL code and CDDL code, the two licenses impose incompatible requirements on the compiled form of the software, and distribution is not possible. (This is in contrast to Debian's plan to ship zfs in source form only in their next release (and also in the somewhat ghettoized "contrib" section rather than "main"); this is considered safer by many because the GPL's restrictions on code in source format are less stringent than code in object code or executable format)

There are two main ways that zfsonlinux's zfs.ko could be a derivative work of linux: First, and the option that many commenters have concentrated on, is if the act of compiling zfs also includes copyrighted portions of linux in a way that activates the GPL's restrictions because the combined work is "a work based on [the Linux kernel]". However, there is a second way that zfsonlinux could be subject to the GPL and CDDL simultaneously: if source code licensed exclusively under the GPL has been copied into the zfsonlinux source tree.

In this article, I collect some samples of code from zfsonlinux and compare those samples to code committed earlier to linux. I present the samples using a customized word diff algorithm. To reproduce my results, you will need to manually find the associated refs in linux.git and zfsonlinux/zfs.git and use your own word-diff algorithm.

I don't know whether I've found the worst of the code copying; I found the two examples given below pretty quickly, imagined that I had found just the tip of the iceberg, and then decided to write this article before looking for more. But I haven't found any more that are as clear-cut as these two examples are in my mind, while also being over ten lines long. Beginner's luck? Or did I find the 50 copied lines out of 260,000 lines in a half hour and that's the whole story?

Because I cannot speak for the authors of the code committed to linux.git which appear to be duplicated in zfsonlinux, it is impossible for me to say whether they have some private arrangement with the code authors that permit the use of the code snippets under the CDDL. If not, it's a legal question whether the amount of code copied is relevant under copyright law. In this area, I imagine caution is best; after all, in the US, Google's copying of the 9-line "RangeCheck" function (out of how many million lines in the JRE?) has been determined not to be de minimis, though in a new trial Google will assert a fair use defense regarding that copying.

(note: some popular RSS readers do not show the color coding of insertions and deletions)

Snippet A: linux at commit 5f99f4e79abc64ed9d93a4b0158b21c64ff7f478
Snippet B: zfsonlinux at commit 0f37d0c8bed442dd0d2c1b1dddd68653fa6eec66
Common text

static inline bool dir_emit(struct dir_context *ctx,
                           const char *name, int namelen,
    uint64_t ino, unsigned type)
       return ctx->actor(ctx->dirent, name, namelen, ctx->pos, ino, type) == 0;
static inline bool dir_emit_dot(struct file *file, struct dir_context *ctx)
       return ctx->actor(ctx->dirent, ".", 1, ctx->pos,
                         file->f_path.dentry->d_inode->i_ino, DT_DIR) == 0;
static inline bool dir_emit_dotdot(struct file *file, struct dir_context *ctx)
       return ctx->actor(ctx->dirent, "..", 2, ctx->pos,
                         parent_ino(file->f_path.dentry), DT_DIR) == 0;
static inline bool dir_emit_dots(struct file *file, struct dir_context *ctx)
       if (ctx->pos == 0) {
               if (!dir_emit_dot(file, ctx))
                       return false;
               ctx->pos = 1;
       if (ctx->pos == 1) {
               if (!dir_emit_dotdot(file, ctx))
                       return false;
               ctx->pos = 2;
       return true;

Snippet A: linux at c3c532061e46156e8aab1268f38d66cfb63aeb2d
Snippet B: zfsonlinux at 5547c2f1bf49802835fd6c52f15115ba344a2a8b
Common text

static inline int bdi_setup_and_register(struct backing_dev_info *bdi, char *name,
                           unsigned int cap)
        char tmp[32];
        int errerror;

        bdi->name = name;
        bdi->capabilities = cap;
        errerror = bdi_init(bdi);
        if (errerror)
                return err;(error);

        sprintf(tmp, "%.28s%s", name, "-%d");
        errerror = bdi_register(bdi, NULL, tmp, atomic_long_inc_return(&bdi_seqzfs_bdi_seq));
        if (errerror) {
                return err;(error);

        return 0;(error);


16 January 2016, 22:15 UTC

Ancho Reyes Hot Chocolate

30 December 2015, 19:38 UTC

Coolest C Preprocessor Trick of the Year

11 November 2015, 13:58 UTC

Community Builder reCAPTCHA

4 November 2015, 15:34 UTC

HTTPS enabled thanks to Let's Encrypt

8 October 2015, 19:52 UTC

Turning off ads and google analytics

All older entries
Website Copyright © 2004-2014 Jeff Epler