Editing Kernel code quotes

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
Here we're collecting some funny quotes from the linux kernel code
 
Here we're collecting some funny quotes from the linux kernel code
 
----
 
<source lang="c">
 
        .owner  = THIS_MODULE,  /* for consistency 8) */
 
</source>
 
 
:''from linux-2.6.25/net/netlink/af_netlink.c (which is '''always''' built-in)''
 
 
----
 
<source lang="c">
 
/*
 
* ...
 
* Yes, it is a memory overhead, but in 2003 AD, who cares?
 
*/
 
</source>
 
 
:''from linux-2.6.24/include/linux/netfilter_bridge/ebt_among.h''
 
 
----
 
<source lang="c">
 
#define BITS_PER_BYTE          8
 
</source>
 
 
:''from linux-2.6.24/include/linux/bitops.h''
 
 
----
 
<source lang="c">
 
/* "NOOP" scheduler: the best scheduler, recommended for all interfaces
 
  under all circumstances. It is difficult to invent anything faster or
 
  cheaper.
 
*/
 
</source>
 
 
:''from linux-2.6.24/net/sched/sch_generic.c''
 
 
----
 
<source lang="c">
 
/*
 
* Whee.. Weird sysv syscall.
 
*/
 
</source>
 
 
:''from linux-2.6.24/fs/filesystems.c''
 
 
----
 
<source lang="c">
 
static char vlan_copyright[] = "...";
 
static char vlan_buggyright[] = "...";
 
</source>
 
 
:''from linux-2.6.24-rc5/net/8021q/vlan.c''
 
 
----
 
<pre>
 
So... these "amateur" devices are hopeless.
 
</pre>
 
 
:''from linux-2.6.24-rc5/net/ipv4/arp.c:arp_constructor()''
 
 
----
 
<source lang="c">
 
/* This code sucks.  But you should have seen it before! --RR */
 
</source>
 
 
:''from linux-2.6.23/net/ipv4/route.c''
 
 
----
 
<source lang="c">
 
static void dn_long_error_report(struct neighbour *neigh, struct sk_buff *skb)
 
{
 
        printk(KERN_DEBUG "dn_long_error_report: called\n");
 
        kfree_skb(skb);
 
}
 
</source>
 
 
:''from linux-2.6.23/net/decnet/dn_neigh.c''
 
 
----
 
<source lang="c">
 
/* Unfortunately we don't support this one.  Any brave souls? */
 
</source>
 
 
:''from linux-2.6.23/include/linux/skbuff.h:skb_forward_csum()''
 
 
----
 
<source lang="c">
 
#define IT_ID_SET      1
 
#define IT_ID_NOT_SET  0
 
</source>
 
 
:''from linux-2.6.23/kernel/posix-timers.c''
 
 
----
 
<source lang="c">
 
* "I ask you, have you ever known what it is to be an orphan?"
 
*/
 
static int will_become_orphaned_pgrp(...
 
</source>
 
 
:''from linux-2.6.23/kernel/exit.c''
 
 
----
 
<source lang="c">
 
#ifndef I_WISH_WORLD_WERE_PERFECT
 
 
/* It is not :-( ...
 
</source>
 
 
:''from linux-2.6.23/net/ipv4/ip_gre.c:ipgre_err()''
 
 
----
 
<pre>
 
weird, but documented
 
</pre>
 
 
:''from linux-2.6.23/net/packet/af_packet.c:packet_create()''
 
  
 
----
 
----
Line 125: Line 9:
  
 
----
 
----
<source lang="c">
+
<pre>
 
static inline int sk_hashed(const struct sock *sk)
 
static inline int sk_hashed(const struct sock *sk)
 
{
 
{
 
         return !sk_unhashed(sk);
 
         return !sk_unhashed(sk);
 
}
 
}
</source>
+
</pre>
  
 
:''from linux-2.6.23/include/net/sock.h''
 
:''from linux-2.6.23/include/net/sock.h''

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)